Skip navigation.
 
mlTrouble with setting up a command in an sdef file in a Cocoa app
FROM : Stephen J McIntosh
DATE : Thu Dec 09 05:07:25 2004

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>

Related mailsAuthorDate
mlTrouble with setting up a command in an sdef file in a Cocoa app Stephen J McIntosh Dec 9, 05:07
mlRe: Trouble with setting up a command in an sdef file in a Cocoa app Don Briggs Dec 9, 06:00