AppleScript Incorporation Woes
AppleScript Incorporation Woes
- Subject: AppleScript Incorporation Woes
- From: Scott Harper <email@hidden>
- Date: Fri, 26 Aug 2005 15:45:26 -0600
Hello --
Following the tutorial in "Cocoa Programming for Mac OS X", Chapter
28, I managed to implement about 66% of the applescript functionality
I need, meaning I can run methods from script, and retrieve data from
the program, but when setting the data, nothing happens. Here is the
code:
MyApp.scriptSutie --
...header stuff... Pretty sur this is right.
<plist version="1.0">
<dict>
<key>AppleEventCode</key>
<string>MQer</string>
<key>Classes</key>
<dict>
<key>MQApplication</key>
<dict>
<key>AppleEventCode</key>
<string>capp</string>
<key>Attributes</key>
<dict>
<key>bnumber</key>
<dict>
<key>AppleEventCode</key>
<string>Bnum</string>
<key>ReadOnly</key>
<string>NO</string>
<key>Type</key>
<string>NSString</string>
</dict>
</dict>
<key>SuperClass</key>
<string>NSCoreSuite.NSApplication</string>
<key>SupportedCommands</key>
...the commands work fine.
</dict>
</dict>
...command def, but this works fine.
<key>Name</key>
<string>Marquer</string>
</dict>
</plist>
The .scriptTermonilogy looks fairly similar, but I'm pretty sure it
works right... If need be I can post it, but I won't now for the
sake of smaller message size...
Here are the methods implemented in the MQApplication's delegate
object class:
//This method works...
- (NSString *)bnumber {
return [numberField stringValue];
}
//This method is never being called... >.<
- (void)setBnumber:(NSString *)s {
NSLog(@"Trying to set bnumber to %@", s);
[numberField setStringValue:s];
}
That log is never generated in the log window, though others are. So
any help given this information, or more specification on what other
information I need to include would be GREAT! Thanks for whatever
you can give me! ^_^
--Scott
_______________________________________________
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