AppleScript and application attributes ?
AppleScript and application attributes ?
- Subject: AppleScript and application attributes ?
- From: Thomas Deniau <email@hidden>
- Date: Thu, 27 Dec 2001 13:30:00 +0100
Hi !
In my application script suite, I've put the following :
NSApplication = {
Superclass = "NSCoreSuite.NSApplication";
"AppleEventCode" = "capp";
"Attributes" = {
"daemoncontroller" = {
"Type" = "KDBCDaemonController";
"AppleEventCode"="KDBD";
"ReadOnly"=YES;
};
[...]
KDBCDaemonController = {
Superclass = "NSCoreSuite.AbstractObject";
"AppleEventCode" = "KDBD";
[...]
In the script dictionary this appears as :
Class application:
[...]
Properties:
<Inheritance> application [r/o] -- All of the properties of the
superclass.
daemoncontroller anything [r/o] -- The main KoDoBo daemon controller.
But when I try to execute the following script:
set a to daemoncontroller of application "MyApplication"
I get a NSCannotCreateScriptCommand error.
However,
tell application "MyApplication"
set a to daemoncontroller
end tell
doesn't produce any error, but the -(id)daemoncontroller method in my
NSApplication category doesn't get called (and I don't get a valid 'a').
Any clue ?
Thanks in advance,
--
Thomas Deniau