[FYI] more sdef-based library stupidity
[FYI] more sdef-based library stupidity
- Subject: [FYI] more sdef-based library stupidity
- From: has <email@hidden>
- Date: Mon, 30 May 2016 20:43:13 +0100
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.
has
[1] Another 'special feature' of keyword commands is that their
parameters are evaluated somewhat lazily, in order to allow object
specifiers to be passed to the command's receiver (a scriptable app) for
evaluation.
_______________________________________________
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