Hi All,
I have a simple scriptable setup in my app to run a command and retrieve a couple properties. I did this easily with the Help of Shane’s new, superb, AppleScriptObjC Explored 5.
I can access the text properties but not the boolean.
in sdef I have “backupactive” property with key “backupProgress”:
<property name="backupactive" code="blIR" type="boolean" access="rw" description="Is a set running.">
<cocoa key="backupProgress"/>
</property>
I have
property backup active:false
on |application|:theApp delegateHandlesKey:theKey
if (theKey as text) is in {"backupProgress", "setNamed"} then
return true
else
return false
end if
end |application|:delegateHandlesKey:
the dictionary shows all as fine and the other properties can be got easily. The backupactive word compiles in script editor but when run I get an apple events error with no explanation (of course)
Did I configure this wrong or do I have to create a new Objc class (parent NSApplication) with the getter method for backupactive? Would prefer to keep it so nice and simple as in Shane’s scripting example, though I noticed he doesn’t have a boolean property in there…
Thanks, Rob