Applescript-able application & Cocoa issue?

Up vote -1 down vote favorite share g+ share fb share tw.

I will begin by saying that I'm a complete newbie as far as AppleScript goes. So here you are... This is what I've done so far : Studied the apple reference for SimpleScripting Implemented an IDENTICAL . Sdef file Set a new property myname Set principal class (in info.

Plist) to ppApplication (my main class inheriting from NSApplication) Set up the accessor to the myname property My sdef file : My ppApplication class : #import #import "ppCore. H" @interface ppApplication : NSApplication { ppCore* core; } @property (assign) ppCore* core; @property (readonly) NSString* myname; @end #import "ppApplication. H" @implementation ppApplication @synthesize core; - (void)awakeFromNib { self setCore:ppCore alloc init; } /******************************************************* * * APPLESCRIPT SUPPORT * *******************************************************/ - (NSString*)myname { return @"DONE"; } @end Now, here's the issue : When I'm trying to run the following script (in AppleScript Editor) tell application "myApplication" myname end tell I'm getting a the variable myname is not defined error.

However : If I go back to Xcode, Build Settings and change the Product Name to - let's say - myApplicationX and recompile, then the above code (changing it to tell application "myApplicationX") DOES WORK. So, what am I doing wrong? Is it possible that the AppleScript Editor doesn't "talk" to my active compilation of the application, but to a previous one?

How could I deal with this WITHOUT changing my Product Name? Objective-c cocoa scripting applescript sdef link|improve this question edited Apr 5 at 11:34 asked Apr 5 at 11:27Dr.Kameleon1,909116 93% accept rate.

Please consider rewriting your question to a much more concise form that addresses the real issue. – Michael J. Barber Apr 5 at 12:34.

There was NO issue with the above code. Simply restarting AppleScript Editor (after making any serious changes to the application) does the trick.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions