• 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: has <email@hidden>
  • Date: Fri, 03 Jun 2016 20:10:56 +0100

Shane Stanley wrote:

> On 3 Jun 2016, at 6:50 PM, Yvan KOENIG <email@hidden> wrote:
>>
>> But I am to see that :
>>
>> use application "Finder"
>> reveal (get someLocalHandler())
>>
>> --> error "Erreur dans Finder : Il est impossible de poursuivre someLocalHandler." number -1708

> You're still telling the Finder to *get* something it knows nothing about.

No, it's not.

There's absolutely nothing in Yvan's code that tells AppleScript to send the `someLocalHandler` message to Finder. Only Finder-defined commands imported via `use` should be implicitly directed to Finder. The name `someLocalHandler` is not defined in the Finder's dictionary, therefore it should not be sent to Finder unless _explicitly_ targeted at it by the code, as in: `tell app "Finder" to someLocalHandler()` or `someLocalHandler() of app "Finder"`.

That keyword-based commands treat their parameters as if enclosed within an invisible `tell` block whose target is the script/app from which that keyword was defined is entirely accidental, a side-effect of mixing new features with old ones without figuring out all the consequences, both desired and undesired, and neither logical nor desirable in any eager, imperative language, never mind one that's supposed to be friendly and easy to learn and use.

> It needs a *my* or equivalent somewhere.

As a temporary workaround, yes. I've had to do this within my own libraries' test scripts when supplying test parameters generated by handlers. A permanent fix requires Radar reports. At this point, I don't care myself: I'm done working on these libraries and just want to hand them off now. There's little bits of documentation still to do and tests to finish, but they're functionally complete and better than anyone else is going to provide any time soon, so I think it's important that someone else take them and get them out to the AS community so they can do some good.


Regards,

has


_______________________________________________
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: [FYI] more sdef-based library stupidity
  • Next by Date: Re: [FYI] more sdef-based library stupidity
  • Previous by thread: Re: [FYI] more sdef-based library stupidity
  • Next by thread: Re: [FYI] more sdef-based library stupidity
  • Index(es):
    • Date
    • Thread