Re: [FYI] more sdef-based library stupidity
Re: [FYI] more sdef-based library stupidity
- Subject: Re: [FYI] more sdef-based library stupidity
- From: Shane Stanley <email@hidden>
- Date: Fri, 03 Jun 2016 12:20:25 +1000
On 31 May 2016, at 5:43 AM, has <email@hidden> wrote:
I LOLed:
use script "SomeFancySDEFEnabledLibrary"
some fancy command someLocalHandler()
--Error: -[BAGenericObjectNoDeleteOSAID someLocalHandler]: unrecognized selector sent to object <BAGenericObjectNoDeleteOSAID @0x7fabd8e19280: OSAID(2)
Looks like AS tries to evaluate the `someLocalHandler()` _expression_ in the library's context[1], instead of the current context as intended. Which, unsurprisingly, fails is the library doesn't contain a handler named `someLocalHandler` (not that you'd want it to be called if it did). The workaround is to write:
some fancy command (my someLocalHandler())
but someone else can go file a bug report/kick Chris P/whatever as I have better things to do.
I'm not sure why you find that so surprising. What would you expect from this?
use application "Finder" reveal someLocalHandler()
on someLocalHandler() return "/" as POSIX file end someLocalHandler
|
_______________________________________________
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