Re: Can't get getOSAID of «script»
Re: Can't get getOSAID of «script»
- Subject: Re: Can't get getOSAID of «script»
- From: Shane Stanley <email@hidden>
- Date: Mon, 15 Aug 2016 13:27:00 +1000
On 15 Aug 2016, at 7:58 AM, Neil Faiman <email@hidden> wrote:
>
> set zbaLib to AppDelegate's zbaLib — <<<<<< Error here
In theory there are two ways to access a property of a Cocoa object: use its identifier, which effectively uses key-value coding, or use an accessor. But in recent versions it looks like using just the identifier is failing. So try using:
set zbaLib to AppDelegate's zbaLib()
I'd like to be able to say you should always use the accessors, but I've seen one case recently (admittedly not involving an ASObjC class, and probably a one-off) where using an accessor caused problems.
You should probably log a bug with Apple over this. The "getOSAID" suggests AS is mishandling key-value access to the object.
I have to say that using class names as property names makes me a bit uncomfortable, too.
--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>, <latenightsw.com>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden