Re: Getting objectSpecifier right...
Re: Getting objectSpecifier right...
- Subject: Re: Getting objectSpecifier right...
- From: Doug Knowles <email@hidden>
- Date: Sun, 10 Oct 2004 20:21:55 -0400
Dustin Voss wrote:
<x-tad-bigger>Actually, no. It should be the class description for the container. The
easiest way to get this is to call (NSScriptClassDescription *) [[self
repository] classDescription], assuming I read your code right. There
is no need to check with the suite registry.
</x-tad-bigger>
I have changed this per your advice, with no change to the results.
Here's more observations:
- The class I'm having trouble with is the target of several "to-many" relationships; i.e., network of "category" classes that refer to each other through various to-many relationships. As a consequence, my "element" descriptions need to refer to the relationship by names other than the type of the class, such as "children", "parents", etc. So I describe the relationship as:
<element type="child" access="r" description="Child(ren) in category hierarchy" >
<cocoa method="childCategories"/>
</element>
...which forces me to create a type for the reference:
<class name="child" plural="children" code="chld" description="Child(ren) of a category" inherits="category">
<cocoa class="Category"/>
</class>
The sdef compiler passes this through by defining "child" as a synonym for "category". I don't know if this has a bearing on what I pass for a key in the category's object specifier.
- A typical descriptor generated by my method seems to have a bad specification of the key, as shown by the debug output below (note the "want:0x00000000"):
Result: <NSAppleEventDescriptor: [ obj { from:obj { from:obj { from:'null'(), want:'docu', form:'name', seld:utxt($0055006E007400690074006C00650064$) }, want:'prop', form:'prop', seld:'rorg' }, want:0x00000000, form:'indx', seld:1 } ]
{«class » 1 of root organizer of document "Untitled" of application "Prospector"}
<x-tad-bigger>
I wrote a guide for supporting AppleScript with Cocoa - the most complete
I've seen - at <</x-tad-bigger><x-tad-bigger>http://cocoadev.com/?HowToSupportAppleScript</x-tad-bigger><x-tad-bigger>>. If you
haven't checked it out already, you should.
</x-tad-bigger>
I have had that page open on my desktop for days now; it has been very helpful to get me this far. Thanks!
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden