Re: Strange Finder behaviour
Re: Strange Finder behaviour
- Subject: Re: Strange Finder behaviour
- From: Christopher Nebel <email@hidden>
- Date: Tue, 5 Oct 2004 13:07:55 -0700
On Oct 5, 2004, at 12:41 PM, Andrew Oliver wrote:
On 10/5/04 11:37 AM, "James Dessart" <email@hidden> wrote:
I'm getting some strange behaviour with the move command in Finder.
Here's the immediately relevant code:
set newFolder to make new folder at folder (tempFolder as alias)
set the name of newFolder to versionString
move toolsFolder to newFolder
I know that toolsFolder is a valid folder, because I got its items
earlier. But here's the exact error message:
Finder got an error: Can't get folder "Tools" of folder
"TemporaryItems" of folder "501" of folder "tmp" of item "private" of
startup disk. (-1728)
This error gets shown when the code above hits the move command.
This is probably a Finder update problem, where one hand of the Finder
(the
part doing the move) hasn't noticed what the other hand (the part
renaming
the folder) is doing.
The simplest solution is probably to:
set newfolder to make new folder at (tempfolder as alias) with
properties
{name: versionString}
move toolsFolder to newFolder
Right solution, wrong reason. "newFolder" is simply an object
specifier, and it's a by-name one: folder "untitled folder" of folder
"TemporaryItems" of etc. Once you change the name, that object
specifier no longer points to a folder that exists, hence the error in
the third line. You'll have a similar problem using any application
that uses by-name specifiers as its canonical form.
--Chris Nebel
AppleScript Engineering
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden