AppleScript support
-
Hi all,
I'm working on adding AppleScript support to my app and having some trouble. I'm trying to follow the rather thin documentation and add a "make" command, but all I get is an error: "MyApp got an error: NSCannotCreateScriptCommandError".
In the .scriptTerminology file, I have this section:
"Commands" = {
"Create" = {
"Name" = "make";
"Description" = "Make a new object.";
In the .scriptSuite file, I have this in the appropriate class entry:
"SupportedCommands" = {
"NSCoreSuite.Create" = "handleMakeScriptCommand:";
};
And I've implemented the "handleMakeScriptCommand:" method. What am I missing?
Also, is there any other source code available besides Sketch and TextEdit? Both of these implement set and get, but don't go any further.
TIA,
Glen
-----------------------------------------------------------------------Glen A. Simmons Software Engineer <gsimmons...> Division of Smith Micro Software, Inc. http://www.smithmicro.com2121 W. Spring Creek Pkwy, Ste. 218 Voice: 972.491.3033Plano, TX 75023 Fax: 972.491.9049----------------------------------------------------------------------- -
on 1/24/01 5:17 PM, Glen Simmons at <gsimmons...> wrote:> Also, is there any other source code available besides Sketch and TextEdit?
> Both of these implement set and get, but don't go any further.
Have you read Andrew Stone's article explaining how to implement AppleScript
in Cocoa apps, in the July 2000 issue of MacTech (vol. 16, no. 7). It might
be available by now on the MacTech site:
<http://www.mactech.com>
-
Bill Cheeseman, Quechee, Vermont <mailto:<cheeseb...>
The AppleScript Sourcebook
<http://www.AppleScriptSourcebook.com/>
Vermont Recipes-A Cocoa Cookbook
<http://www.stepwise.com/Articles/VermontRecipes/> -
On the complete other side of the world (see my previous post !), you could have a look at MRJ and AppleScript world... they have some more examples...
Paul
On Wednesday, January 24, 2001, at 11:17 PM, Glen Simmons wrote:> Hi all,
>
> I'm working on adding AppleScript support to my app and having some trouble. I'm trying to
> follow the rather thin documentation and add a "make" command, but all I get is an error:
> "MyApp got an error: NSCannotCreateScriptCommandError".
>
> In the .scriptTerminology file, I have this section:
> "Commands" = {
> "Create" = {
> "Name" = "make";
> "Description" = "Make a new object.";
>
> In the .scriptSuite file, I have this in the appropriate class entry:
> "SupportedCommands" = {
> "NSCoreSuite.Create" = "handleMakeScriptCommand:";
> };
>
> And I've implemented the "handleMakeScriptCommand:" method. What am I missing?
>
> Also, is there any other source code available besides Sketch and TextEdit? Both of these
> implement set and get, but don't go any further.
>
> TIA,
> Glen
>
>
> -----------------------------------------------------------------------
> Glen A. Simmons
> Software Engineer <gsimmons...>
> Mac Division of Smith Micro Software, Inc. http://www.smithmicro.com
> 2121 W. Spring Creek Pkwy, Ste. 218 Voice: 972.491.3033
> Plano, TX 75023 Fax: 972.491.9049
> -----------------------------------------------------------------------
> _______________________________________________
> MacOSX-dev mailing list
> <MacOSX-dev...>
> http://www.omnigroup.com/mailman/listinfo/macosx-dev
>
>


