K
Kev Jackson
Which of the following is considered better style?
$ie.text_field(args[0],
$test_data[args[1].to_s]["#{args[2]}_fld"]).value=$test_data[args[1].to_s][args[2].to_s]
$ie.text_field(args[0],
$test_data["#{args[1]}"]["#{args[2]}_fld"]).value=$test_data["#{args[1]}"]["#{args[2]}"]
ie is it better to use args[1].to_s or "#{args[1]}"
My current thinking is that "#{}" should be used when concatenating
strings together with values (or interpolating), where as .to_s should
be used when you want the string representation of an object.
Thanks
Kev
PS - I managed to get rid of all the evals hooray for me!
$ie.text_field(args[0],
$test_data[args[1].to_s]["#{args[2]}_fld"]).value=$test_data[args[1].to_s][args[2].to_s]
$ie.text_field(args[0],
$test_data["#{args[1]}"]["#{args[2]}_fld"]).value=$test_data["#{args[1]}"]["#{args[2]}"]
ie is it better to use args[1].to_s or "#{args[1]}"
My current thinking is that "#{}" should be used when concatenating
strings together with values (or interpolating), where as .to_s should
be used when you want the string representation of an object.
Thanks
Kev
PS - I managed to get rid of all the evals hooray for me!