History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: WTR-61
Type: New Feature New Feature
Status: Open Open
Priority: Minor Minor
Assignee: Unassigned
Reporter: Bret Pettichord
Votes: 5
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
Watir

Make Watir use zero based indexing

Created: 03/May/06 12:25 PM   Updated: 28/Oct/08 05:15 PM
Component/s: HTML Controls
Affects Version/s: 1.4
Fix Version/s: 1.6.2

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Sub-Tasks  All   Open   
 Sub-Task Progress: 

 Description  « Hide
we currently use one-based indexing for :index and for columns and rows in tables, but users are confused and can't
tell where Watir's one-based indexing end and Ruby's zero-based indexing begins.

We need to make watir consistent with ruby.

Originally reported on Rubyforge: http://rubyforge.org/tracker/index.php?func=detail&aid=2281&group_id=104&atid=490

 All   Comments   Work Log   Change History      Sort Order:
John Lolis - 24/Jan/07 03:51 PM
I say no to this.

If the index was changed from what it currently is LOTS of things are going to break. If this this is put in i would request it be some kind of flag (ie.zero_based_index = yes) or something along those lines. I'm sitting on about 6 thousands lines of code in a giant test harness, i tried my best to avoid using index but in some cases I had to. My harness was designed around an 'api' approach, but I still don't want to update it just because.

Just adding some real world experience to the issue.

Sergio - 24/Jan/07 06:05 PM
I agree with part of what John said.

I do think that it should be changed to 0 because that is consistent with Ruby and most other programming languages out there. But I think having a flag of some type or something to of this nature would help people that aren't ready to go back and make changes to their existing code.

bretts - 25/Jan/07 09:23 AM
I would like to see if fixed and be consistent. It's a minor inconvenience to go and update some code.