objectSpecifier for a dictionary?
objectSpecifier for a dictionary?
- Subject: objectSpecifier for a dictionary?
- From: Ivan Kourtev <email@hidden>
- Date: Sun, 5 Mar 2006 18:46:45 -0500
Hi,
I am trying to make my app scriptable and want to be able to set and
get a dictionary property. Working on the get part first, I've got
it to a point where I have subclassed NSDictionary and Implemented
objectSpecifier for it as show below:
- (NSScriptObjectSpecifier *)objectSpecifier {
NSScriptObjectSpecifier *containerRef = [NSApp objectSpecifier];
return [[[NSPropertySpecifier alloc]
initWithContainerClassDescription:[containerRef keyClassDescription]
containerSpecifier:containerRef key:@"propertyKey"]
autorelease];
}
Everything compiles and runs but all I get back in my script is
tell application "AST1"
get properties
{class:application, appPropertyOne:«class constant ****all »}
end tell
So appPropertyOne is the dictionary packaged by the objectSpecifier
above (I am not even fully sure this is right but is my best shot).
Now how do I get the objects in the dictionary within my calling
script? All keys and objects are strings.
Also, when I do get to the set part, how do I package a dictionary
within my script to set the property within the app?
Cheers,
--
ivan _______________________________________________
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