Re: Renaming files in Finder: why so slow?
Re: Renaming files in Finder: why so slow?
- Subject: Re: Renaming files in Finder: why so slow?
- From: Emmanuel <email@hidden>
- Date: Sun, 31 Aug 2003 13:19:41 +0200
At 11:07 AM +0100 8/31/03, Nigel Garvey wrote:
>
on doUnderScore(theList)
[...]
>
repeat with thisItem in theList
[...]
>
my doUnderScore(thisItem)
[...]
>
end repeat
[...]
>
end doUnderScore
This is a circumstance where recursivity is only a comfort issue, the algorithm is not intrinsically recursive. Recursive routines should be avoided whenever possible, I think. A recursive algorithm is that algorithm that always works like a charm except the day you would *really* need.
Here I think that it is enough to:
1. maintain a global "theList"
2. replacing the call to "my doUnderScore" with something by "set end of theList to thisItem"
3. instead of calling once doUnderScore, call it with "repeat while theList's length is 0"
Emmanuel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.