Trouble with setting up a command in an sdef file in a Cocoa app
Trouble with setting up a command in an sdef file in a Cocoa app
- Subject: Trouble with setting up a command in an sdef file in a Cocoa app
- From: Stephen J McIntosh <email@hidden>
- Date: Thu, 9 Dec 2004 15:07:25 +1100
I have a test application with an sdef file, where I would like to add a command "doNoise"
The problem is that I get the AppleScript error message that "Can't continue doNoise"
I can't find much info on setting up a command using an sdef, so any help/pointers would be very much appreciated.
Thanks in advance
Steve
I have:
- setup a cocoa method in my delegated controller class to process the command
- (void)handleBlackWhiteNoise:(NSScriptCommand *)inCommand
- here is the sdef file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dictionary SYSTEM "file://localhost/System/Library/DTDs/sdef.dtd">
<dictionary title="ImageBuddy Terminology">
<suite name="ImageBuddy Suite" code="ibSs"
description="Commands and classes for the ImageBuddy application.">
<classes>
<class name="application" code="capp" description=""
inherits="NSCoreSuite.NSApplication">
<cocoa class="NSApplication"/>
<responds-to-commands>
<responds-to name="doNoise">
<cocoa method="handleBlackWhiteNoise:"/>
</responds-to>
</responds-to-commands>
</class>
</classes>
<commands>
<command name="doNoise" code="doNoise "
description="Toggle the checkbox to add/remove black and white noise to the images.">
<cocoa class="NSScriptCommand"/>
</command>
</commands>
</suite>
</dictionary>
_______________________________________________
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