• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
[FYI] more sdef-based library stupidity
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[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


  • Prev by Date: Re: use vs. Scripting Additions
  • Next by Date: AppleScript Newbie with a Spotlight (Mac) problem.
  • Previous by thread: Re: Automator - how do I choose the level of disk encryption?
  • Next by thread: AppleScript Newbie with a Spotlight (Mac) problem.
  • Index(es):
    • Date
    • Thread