Edit AllPages

Hello- I am attempting to support applescript in my recipe management application that has a simple structure. The applications delegate class, CWGMainController, supports applecsript with the following methods:

@implementation CWGMainController (CWGScriptability)

Now, the recipe class, [[CWGRecipe, also has scripting support:

@implementation CWGRecipe (CWGscriptability)

my sdef file looks like this:

note that I am not showing the complete sdef file. It contains the standard suite…

So, now if I run a simple script like this:

tell application “Organized Gourmet” make new recipe with properties {name:”recipe from applescript”} end tell

the script returns a “NSUnknownKeyScriptError”. Now for the crazy part: the script does what it is supposed to. ‘application:delegateHandlesKey:’ is called and then ‘insertInRecipes:’ is called. Therefore, the recipe is created and inserted into the correct array. Neither of the objectSpecifiers is called.

I believe that the script is expecting a return specifier but, since those functions are not being called, I am a bit confused. Any ideas?


so, it appears as though the problem is in the line recipeController xmlParser] addRecipe:newRecipe]; If I remove the line, the error goes away, but so does the functionality. Interestingly, the next call is to objectSpecifier: in the [[CWGRecipe class.