Re: [Wtr-general] undefined method `[]' for nil:NilClass (NoMethodError) error at the end of array???

2007-01-24 Thread Paul Carvalho
On 23/01/07, Bret Pettichord wrote: This is largely because Watir is stupid in this area. We made a bad design choice with Watir 1.0. We'd now like to make Watir consistent and start with 0 everywhere (like everything else in Ruby) but this would raise compatibility issues. We welcome your

Re: [Wtr-general] undefined method `[]' for nil:NilClass (NoMethodError) error at the end of array???

2007-01-24 Thread mi
Whoever you are, you are FREAKING FUNNY and made an excellent point here:-) So, Paul, how many children do you have? Well, my first boy would be 0, and my second son would be 1, so I guess I have 1 child. Even the Cat in the Hat's best friends are Thing 1 and Thing 2. I would have like

Re: [Wtr-general] undefined method `[]' for nil:NilClass (NoMethodError) error at the end of array???

2007-01-24 Thread Bret Pettichord
Željko Filipin wrote: We'd now like to make Watir consistent and start with 0 everywhere (like everything else in Ruby) but this would raise compatibility issues. We welcome your thoughts in this area. I vote for start with 0 everywhere. Here is where you and everyone with an

Re: [Wtr-general] undefined method `[]' for nil:NilClass (NoMethodError) error at the end of array???

2007-01-24 Thread Paul Rogers
do we have the ability to vote 'Yes - with no backwards compatability' 'Yes - with backwards compatability' or 'No' or just yes or no Ive just grepped my code and found 196 occurrances of :index :-( Paul - Original Message - From: Bret Pettichord [EMAIL PROTECTED] Date: Wednesday,

Re: [Wtr-general] undefined method `[]' for nil:NilClass (NoMethodError) error at the end of array???

2007-01-24 Thread Bret Pettichord
Paul Rogers wrote: do we have the ability to vote 'Yes - with no backwards compatability' 'Yes - with backwards compatability' or 'No' or just yes or no I created two sub tickets. Vote for the one you want. Without backwards compatibility http://jira.openqa.org/browse/WTR-135 With

Re: [Wtr-general] undefined method `[]' for nil:NilClass (NoMethodError) error at the end of array???

2007-01-23 Thread Chris McMahon
On 1/22/07, mi [EMAIL PROTECTED] wrote: t = [[a, b], [aa, bb]] 0.upto (t.length) { |x| puts t[x][0] } For some reason i'm getting the following error at the end of the loop, any idea WHY??? 0.upto (t.length-1) { |x| puts t[x][0] } should do it, but I think you figured that out.

Re: [Wtr-general] undefined method `[]' for nil:NilClass (NoMethodError) error at the end of array???

2007-01-23 Thread Paul Carvalho
This is one of those times when I'll never understand why some things in programming start counting at 1 and some things start counting at 0. I, too, have several similar loops in some of my scripts, but I opted for the more readable format of saying: t.length.times { |x| puts t[x][0] } I

Re: [Wtr-general] undefined method `[]' for nil:NilClass (NoMethodError) error at the end of array???

2007-01-23 Thread Bret Pettichord
Paul Carvalho wrote: This is one of those times when I'll never understand why some things in programming start counting at 1 and some things start counting at 0. This is largely because Watir is stupid in this area. We made a bad design choice with Watir 1.0. We'd now like to make Watir

Re: [Wtr-general] undefined method `[]' for nil:NilClass (NoMethodError) error at the end of array???

2007-01-23 Thread Željko Filipin
On 1/24/07, Bret Pettichord [EMAIL PROTECTED] wrote: We'd now like to make Watir consistent and start with 0 everywhere (like everything else in Ruby) but this would raise compatibility issues. We welcome your thoughts in this area. I vote for start with 0 everywhere. -- Zeljko Filipin

Re: [Wtr-general] undefined method `[]' for nil:NilClass (NoMethodError) error at the end of array???

2007-01-22 Thread mi
sorry, i keep forgetting that the array starts at 0:-( mi wrote: t = [[a, b], [aa, bb]] 0.upto (t.length) { |x| puts t[x][0] } For some reason i'm getting the following error at the end of the loop, any idea WHY??? a aa undefined method `[]' for nil:NilClass (NoMethodError) Thanks

[Wtr-general] undefined method `[]' for nil:NilClass (NoMethodError) error at the end of array???

2007-01-22 Thread mi
t = [[a, b], [aa, bb]] 0.upto (t.length) { |x| puts t[x][0] } For some reason i'm getting the following error at the end of the loop, any idea WHY??? a aa undefined method `[]' for nil:NilClass (NoMethodError) Thanks in advance! ___ Wtr-general