realbasic-nug
[Top] [All Lists]

Re: FolderItem.delete Oddities?

To: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Subject: Re: FolderItem.delete Oddities?
From: Andy Dent <dent@oofile.com.au>
Date: Wed, 1 Apr 2009 02:15:38 +0800
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: <E14D1190-E2BE-4E5A-BD5A-56B5ED3032EC@kimballlarsen.com>
References: <E14D1190-E2BE-4E5A-BD5A-56B5ED3032EC@kimballlarsen.com>
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com

On 01/04/2009, at 2:09 AM, Kimball Larsen wrote:

Has anyone noticed any problem with folderitem.delete where it deletes some files, but not others?

Here's the background: I'm trying to empty a directory that I created to hold some temporary images. Here is the code I'm using to delete:

 dim f as FolderItem = specialFolder.Temporary.child("ah")
 dim f2 as folderItem
 dim i as integer
 for i = 1 to f.Count
   f2 = f.item(i)
use item(0) here always, not item(i)

You want to delete f.Count files. As you delete them, the effect of the item call changes.


_______________________________________________
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>