• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
objectSpecifier for a dictionary?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: Using a custom NSCell for NSButton created in IB
  • Next by Date: Re: Using a custom NSCell for NSButton created in IB
  • Previous by thread: Re: Fastest Datastore?
  • Next by thread: retain/release question about Apple docs
  • Index(es):
    • Date
    • Thread