Re: AppleScript Question
Re: AppleScript Question
- Subject: Re: AppleScript Question
- From: Chris Hanson <email@hidden>
- Date: Mon, 11 Feb 2002 19:25:21 -0600
At 12:13 AM -0800 2/11/02, Steve Gehrman wrote:
{application file "Graphing Calculator" of folder "Tests" of disk
"Experiments" of application "Finder"}
This is a list of object specifiers with one element. You can tell
it's a list by the surrounding braces, and you can tell it's an
object specifier by the '<type> <signifier> of <type> <signifier> of
<type signifier>' notation.
Essentially, an object specifier is a special kind of AEDesc that
consists of a desired object class, a container, a key form, and a
key data. Above, you have an object specifier as follows:
Class: application file
Key form: name
Key data: (string) "Graphing Calculator"
Container: <another object specifier #>
That's right, the container can be another object specifier:
Class: folder
Key form: name
Key data: "Tests"
Container: an AEDesc of typeFSSpec to the disk "Experiments"
Or it could be of type FSSpec or FSRef, and Script Editor is just
coercing it to a nice textual description. The AppleEvent Object
Model is *very* flexible in this regard, and will do a lot of
coercion for you (and enable you to add new coercions if you want).
To learn this stuff, you'd be best off reading some of "Inside
Macintosh: Inter-Application Communication". There were also some
good articles in Develop, the Apple technical journal that ran from
1990 through 1996. I think all the Develop content is still on
Apple's web site.
-- Chris
--
Chris Hanson | Email: email@hidden
bDistributed.com, Inc. | Phone: +1-847-372-3955
Making Business Distributed | Fax: +1-847-589-3738
http://bdistributed.com/ | Personal Email: email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.