| To: | REALbasic NUG <realbasic-nug@lists.realsoftware.com> |
|---|---|
| Subject: | Re: FolderItem.delete Oddities? |
| From: | Charles Yeomans <charles@declareSub.com> |
| Date: | Tue, 31 Mar 2009 16:17:47 -0400 |
| 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: | <7DE62196-EFC3-4EC6-A869-1027239E9DD7@mac.com> |
| References: | <382799.72156.qm@web65614.mail.ac4.yahoo.com> <A0B9E68F-F447-4291-9727-E72D8648E1B4@online.de> <7DE62196-EFC3-4EC6-A869-1027239E9DD7@mac.com> |
| Reply-to: | REALbasic NUG <realbasic-nug@lists.realsoftware.com> |
| Sender: | realbasic-nug-bounces@lists.realsoftware.com |
On Mar 31, 2009, at 3:55 PM, Arnaud Nicolet wrote: Le 31 mars 09 à 20:41, Christian Dorn a écrit:No, because of some recent changes in Mac OS 10.5 (or coming changes in 10.6?) this shouldn't be done, IIRC. I think you'll find something on this matter in the archives...Maybe this page is of interest for you: http://www.declaresub.com/wiki/index.php/Delete_items_from_a_listAfter looking at that page, it appears a way isn't listed. So I wonder if the way I think of is actually bad.I'd do that way: dim i as integer for i=0 to ubound(SomeArray) if SomeArray(i).HasToBeDeleted then SomeArray.Delete i=i-1 end if nextWell, it's similar to the first case, but still a bit different (for loop instead of while, and less lines of code).It's a bad one? Yes. In fact, code like this is often offered as an example of bad. The reason is that it sabotages the intent of the for-next structure. Charles Yeomans _______________________________________________ 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> |
|---|---|---|
| ||
| Previous by Date: | Re: [ANN] OMMs 3.0, Lars Jensen |
|---|---|
| Next by Date: | Re: FolderItem.delete Oddities?, Joe Strout |
| Previous by Thread: | Re: FolderItem.delete Oddities?, Arnaud Nicolet |
| Next by Thread: | Re: FolderItem.delete Oddities?, Arnaud Nicolet |
| Indexes: | [Date] [Thread] [Top] [All Lists] |