Conflict of interests btw System Events and Standard Additions
Conflict of interests btw System Events and Standard Additions
- Subject: Conflict of interests btw System Events and Standard Additions
- From: Daniel Jalkut <email@hidden>
- Date: Tue, 13 Sep 2005 17:57:54 -0400
Jon Gruber had an interesting entry on his blog, about one of the
frustrating elements of the current state of AppleScript affairs.
He noticed that if you ask System Events for a "path to" something
"from user domain", it seems to ignore the domain part of the request.
I looked into this more carefully and discovered the cause: System
Events defines "user domain" as an object, while Standard Additions
defines it as an enumeration. When you use the standard additions
"path to" command from within a System Events scope, it allow the
"user domain" object from System Events to override the parameter
enumeration from SA.
This is indeed a crappy state of affairs. What is the best workaround
for situations like this? I suggested setting a variable outside the
System Events scope:
set myUserDomain to user domain
Then you can the path to command like this:
tell application "System Events"
path to application support from myUserDomain
end
Daniel
_______________________________________________
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