Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Element "initializers"



I'm curious about the right way to express that in the sdef and in the running application. I envision two scenarios:

1. I mark the properties as "read-only" in the sdef and require the user to specify the value of those properties in the "with properties" parameter of the "make" command. Can a read-only property still be initialized with the "with properties" parameter?

This sounds like the right thing to me. If you know a little bit about when your object will be inserted in its associated collection, you can fiddle with -setScriptingProperties:. Otherwise, you’ll probably have to subclass NSCreateCommand [1]; take a look at the - resolvedKeyDictionary:.


-Ben

[1]: http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSCreateCommand_Class/Reference/Reference.html _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-implementors mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-implementors/email@hidden

This email sent to email@hidden
References: 
 >Element "initializers" (From: Scott Thompson <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.