Re: "path to resource" in a tell Finder statement doesn't work
Re: "path to resource" in a tell Finder statement doesn't work
- Subject: Re: "path to resource" in a tell Finder statement doesn't work
- From: Andrea -XFox- Govoni <email@hidden>
- Date: Mon, 09 Jan 2006 16:23:58 +0100
Daniel Jalkut ha scritto:
> Indeed - and this is how the "path to resource" command is working. In
> the same way that "display dialog" in a tell block will cause the dialog
> to appear in the context of the targeted application, the path to
> resource command is executing in the Finder's context, and thus
> searching for resources in its bundle contents.
>
> For instance, try changing your code to this:
>
> tell application "Finder" to set iconToUse to path to
> resource "burnableFolder.icns"
>
> The scripting addition is being very consistent - always doing the same
> thing - it's you that is pulling the rug out from under it by changing
> what "the resources folder" is at the given time. :)
Ok, you convinced me.
However, maybe it should be made clearer in the ScriptingAdditions
dictionary, as it states:
path to resource v : Return the full path to the specified resource
path to resource string : the name of the requested resource
[in bundle file] : an alias or file reference to the bundle containing
the resource (default is the current application/script bundle)
I interpreted "default is the current application/script bundle" as the
application or script bundle from which the command is executed.
Shouldn't be less misleading "default is the current application" and stop?
--
Andrea "XFox" Govoni
AIM/iChat/ICQ: email@hidden
Yahoo! ID: xfox82
Skype Name: draykan
PGP
KeyID: 0x212E69C1
Fingerprint: FBE1 CA7D 34BE 4A53 9639 5C36 B7A0 605F 212E 69C1
_______________________________________________
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