realbasic-nug
[Top] [All Lists]

Re: FolderItem.delete Oddities?

To: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Subject: Re: FolderItem.delete Oddities?
From: Joe Strout <joe@inspiringapps.com>
Date: Tue, 31 Mar 2009 14:18:14 -0600
Authentication-results: mx.google.com; spf=neutral (google.com: 74.124.194.228 is neither permitted nor denied by best guess record for domain of realbasic-nug-bounces@lists.realsoftware.com) smtp.mail=realbasic-nug-bounces@lists.realsoftware.com
Delivered-to: listarchive@realsoftware.com
In-reply-to: <89fe53800903311300h3ddcb293w3be9cb54acb7d865@mail.gmail.com>
Organization: Inspiring Applications, Inc.
References: <382799.72156.qm@web65614.mail.ac4.yahoo.com> <A0B9E68F-F447-4291-9727-E72D8648E1B4@online.de> <58031FB4-BB70-45EC-B698-FBB7998DC783@mac.com> <E7631244-FE97-4299-BC4A-79EDF81E8393@online.de> <89fe53800903311240y1999380dt2fbfe60ce44cc408@mail.gmail.com> <2DA6A6CD-2049-437C-B9DC-F95144365F35@mac.com> <89fe53800903311300h3ddcb293w3be9cb54acb7d865@mail.gmail.com>
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com
User-agent: Thunderbird 2.0.0.21 (Macintosh/20090302)
Thomas Tempelmann wrote:

The only use of indexing a directory by a number from 1 to f.Count()
was to get all items of a dir. It can't be used for anything else. You
cannot store the index and then later expect that if you get the item
for the same index, you'll get the same item, because other files may
have been added (or subtracted) to the dir in the mean time. And even
for that way to get all items in a dir, it's counter-intuitive to use
an index number. All you want is: All Items in the Folder, then
operate on that result.

This is a good point, and it suggests that we should simply add an Items (and TrueItems) extension method to FolderItem and have done with it. This is trivial to do; no need to wait for RS to add it for us.

Best,
- Joe

--
Joe Strout
Inspiring Applications, Inc.
http://www.InspiringApps.com


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>