Zeljko and Bret,
Thanks for that. As you found out, googling for an explanation wasn't
easy. Searching for "string interpolation" gives me plenty of
results. Mind you, the explanation you gave was enough anyway.
Thanks.
Cheers,
Daniel.
On 06/07/06, Bret Pettichord <[EMAIL PROTECTED]> wrote:
On 7/6/06, Daniel Browne <[EMAIL PROTECTED]> wrote:
I was wondering if you could tell me exactly what the "#" operatordoes in this case? I have had a look at the ruby documentation butcannot find an explanation. Thanks.The name for this feature is "string interpolation". You might be able to find
#{} inside double quoted strings lets you include variables in
strings. Like this:
irb(main):001:0> a = 1
=> 1
irb(main):004:0> "a = #{a}"
=> "a = 1"
I just performed a google search for #{} and "#{}" (without quotes and
with quotes) and got very interesting results. No match. I do not
think I ha
Frank,
I was wondering if you could tell me exactly what the "#" operator
does in this case? I have had a look at the ruby documentation but
cannot find an explanation. Thanks.
Cheers,
Daniel.
On 29/06/06, Legarreta, Frank <[EMAIL PROTECTED]> wrote:
>
>
>
>
> Thank you all so much!
>
>
>
> ie.
Thank you all so much!
ie.text_field(:name,"grade_result_list[#{x}].beanCount").set("800")
Worked like a charm.
Regards,
Frank
"This e-mail and any attachments may contain confidential and privileged information. Any dissemination or use of the information by a person other t
I misunderstood the question. I like Rand's answer.On 6/28/06, Rand Thacker <[EMAIL PROTECTED]> wrote:
ie.text_field(:name,"grade_result_list[#{x}].beanCount").set("800")should do the trick. Hope that helps
On 6/28/06, Legarreta, Frank <
[EMAIL PROTECTED]> wrote:
When I h
ie.text_field(:name,"grade_result_list[#{x}].beanCount").set("800")should do the trick. Hope that helps
On 6/28/06, Legarreta, Frank <[EMAIL PROTECTED]> wrote:
When I hardcode an array to a set value it works: ie. "grade_result_list[1].beanCount"
(where 1 is the array valu
How about using #{x} in place of just x
?
> irb(main):085:0>
ie.text_field(:name,
grade_result_list[x].beanCount).set("800")
> NameError: undefined local variable
or method `grade_result_list' for #x2799258
@x=4>
This e-mail message is being sent solely for use by the intend
Brett,
It did not seem to like the variable name without the
quotes. Once I put the quotes back and put a value (ie. [4]) in the
array element, it works fine.
irb(main):085:0> ie.text_field(:name,
grade_result_list[x].beanCount).set("800")
NameError: undefined local variable
Remove the quotes.for x in 1..rows do
ie.text_field(:name, grade_result_list[x].beanCount).set("800")
endOn 6/28/06, Legarreta, Frank <
[EMAIL PROTECTED]> wrote:
When I hardcode an array to a set value it works: ie. "grade_result_list[1].beanCount"
(where 1 is the array value).
How
When I hardcode an array to a set value it works: ie. “grade_result_list[1].beanCount”
(where 1 is the array value).
However, I have an unknown number of rows, and when I try to
increment the array value (see below) it does not work.
11 matches
Mail list logo