realbasic-nug
[Top] [All Lists]

Re: FolderItem.delete Oddities?

To: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Subject: Re: FolderItem.delete Oddities?
From: Lennox Jacob <lenpartico@yahoo.com>
Date: Tue, 31 Mar 2009 11:29:51 -0700 (PDT)
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; dkim=neutral (body hash did not verify) header.i=@yahoo.com
Delivered-to: listarchive@realsoftware.com
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1238524192; bh=94912gJKkRMEeJXiZxuHWKZcWEETCvZ4g8gNgeRa8+g=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=yUzRFdgwYkIY5MwXk5yUCi4+wd5N1GxMjNyXfKEPwAlkUUbUET8DoMEEgRWBmt5cuEdla9dMx9zuYXkpCVK/+oUN4tSI49pLpUWot4PIMocxnqZEVn9z8HAIpbxrUTW5XRGZq4F0yhtvHOXDLKjLcirs+h3/DPU/r/PBpAawtYw=
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=LsHePImjSFF0ZK3f6lSiWvK8fRUz0piyNx1uEXMIeJstuJ6r/ygaQdKObj0I3UOw2qsarlWu2L1TXMICsw3LXep/vm9pdtfDcWAfZLxCVD5s9jMx7yL+tixbIQF3Xoa70zQwENQwY7oLS30fu993rMWB4IDiU1nSWizGTGjXRg4=;
In-reply-to: <E14D1190-E2BE-4E5A-BD5A-56B5ED3032EC@kimballlarsen.com>
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com
What about for f.Count downto 1 instead of for i = 1 to f.Count?


--- On Tue, 3/31/09, Kimball Larsen <kimball@kimballlarsen.com> wrote:

> From: Kimball Larsen <kimball@kimballlarsen.com>
> Subject: FolderItem.delete Oddities?
> To: "REALbasic NUG" <realbasic-nug@lists.realsoftware.com>
> Date: Tuesday, March 31, 2009, 11:09 AM
> 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)
>     f2.Delete
>   next
>   f.delete
> 
> Prior to the delete, the directory contains the following
> files:
> 
> bottle101.png 
> bottle202.png 
> bottle207.png 
> bottle404.png 
> facts101.png  
> facts202.png  
> facts207.png  
> facts404.png
> bottle102.png 
> bottle204.png 
> bottle302.png 
> bottle502.png 
> facts102.png  
> facts204.png  
> facts302.png  
> facts502.png
> bottle105.png 
> bottle205.png 
> bottle304.png 
> bottle508.png 
> facts105.png  
> facts205.png  
> facts304.png  
> facts508.png
> bottle201.png 
> bottle206.png 
> bottle402.png 
> bottle510.png 
> facts201.png  
> facts206.png  
> facts402.png  
> facts510.png
> 
> After the delete, it contains these:
> bottle102.png 
> bottle206.png 
> bottle402.png 
> bottle508.png 
> facts201.png  
> facts302.png  
> facts404.png  
> facts510.png
> bottle201.png 
> bottle302.png 
> bottle404.png 
> bottle510.png 
> facts204.png  
> facts304.png  
> facts502.png
> bottle204.png 
> bottle304.png 
> bottle502.png 
> facts102.png  
> facts206.png  
> facts402.png  
> facts508.png
> 
> So, it's deleting some of them, but not all.
> 
> What gives?
> 
> 
> - Kimball
> http://www.kimballlarsen.com
> 
> 
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
> 
> Search the archives:
> <http://support.realsoftware.com/listarchives/lists.html>


      

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