On Oct 6, 2006, at 4:04 PM, Terry Ford wrote:
On Oct 6, 2006, at 12:25 PM, Mike Woodworth wrote:
Ok... i got to bring up the counter point here. how many of us
really roll our codebases from one version of RB to the next
without having to track down new issues and code around them? so
heres my ugly ugly solution (this will take a few releases of RB):
add a folderitem.ubound method which returns count -1.
Ubound always returns the highest address of any array of items.
Why should it break that concept?
deprecate folderitem.count (but obviously keep it for old code)
That would be very confusing.
define and *well* document that folderitem.item(0) returns the
same item as folderitem.item(folderitem.count)
Are you implying substituting a calculated number variable for a
folderitem at folderitem.item(0).
I do agree, however, that .Count is not always consistent unless
you understand that it doesn't include item(0) because it is a
directory.
now, we can start using folderitem as 0 based, old code continues
to run, and we can slowly build up a year or so of versions of RB
which will play well with code once .count is removed entirely.
I just don't see that. In a multidimensional array, for example,
the 0 item refers to the first element of the dimension. If that
were missing in a Folderitem directory array then where would it go?
Perhaps i wasn't clear, but by doing this, you could use ubound as
the upper bounds for your loops and item(0) and it would work like a
0 based array, or use count and skip item(0) as we are supposed to
now, and use it as a 1 based array.
mike
--
Mike Woodworth
[EMAIL PROTECTED]
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>