• 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
Re: [FYI] more sdef-based library stupidity
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


-- 
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>

 _______________________________________________
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: looking for regular expression examples
  • Next by Date: ASObjC: Get Most Recent File or Folder
  • Previous by thread: Re: looking for regular expression examples
  • Next by thread: Re: [FYI] more sdef-based library stupidity
  • Index(es):
    • Date
    • Thread