Hi everyone!
I'm having a problem with my app/my sdef/AppleScript that I have been staring at 7 ways to Sunday and just can't seem to figure out what's wrong and where else to look...
The setup:
an applescriptable application (Sample Manager) with all sorts of commands and properties. The commands are working fine. However the properties of the app, no matter what I do, are always showing up in Script Editor as non-writable.
the .sdef
===
<!-- Classes -->
<class name="application" code="capp" description="The Sample Manager application.">
<cocoa class="SMApplication"/>
...
<property name="undo enabled" code="UNDO" description="Is undo enabled?" type="boolean">
<cocoa key="undoEnabled"/>
</property>
===
the cocoa code (in the implementation for SMApplication)
===
- (BOOL)undoEnabled
{
return [[NSUserDefaults standardUserDefaults] boolForKey:@"Undo Enabled"];
}
- (void)setUndoEnabled:(BOOL)s
{
[[NSUserDefaults standardUserDefaults] setBool:s forKey:@"Undo Enabled"];
}
the script
===
tell application "Sample Manager"
set undo enabled to true
end tell
when I click "run", I get this error:
"Sample Manager got an error: The parameter is not writable."
Now, I could be picky and assume the error is saying I'm using the wrong thing: "the PARAMETER is not writable", when I'm actually trying to change a PROPERTY. But I can't tell if that's a clue or not.
Can anyone tell me where else to look to fix up the writable attribute for my app properties?
Thanks a bunch in advance!
Ev
Technical Knowledge Officer
Head Programmer/Designer
Audiofile Engineering
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Help/Unsubscribe/Update your Subscription: