• 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: Tell Blocks Considered Harmful (was Re: open for access)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tell Blocks Considered Harmful (was Re: open for access)


  • Subject: Re: Tell Blocks Considered Harmful (was Re: open for access)
  • From: Chris Page <email@hidden>
  • Date: Wed, 10 Dec 2008 16:27:44 -0800

On Dec 10, 2008, at 1:46 AM, Philip Aker wrote:

On 2008-12-09, at 18:25:18, Chris Page wrote:

i.e., even with “associate … with” it would be best to avoid placing things inside tell blocks unnecessarily.

Ok and yes, but my intent is to solve AppleScript's symbol addressing problem such that calls to other terminology providers within a 'tell application' block can be made unambiguously. What I'm trying to illustrate is an upgrade to 'tell application "XXX"' such that the terminology association and interpretation is associated to the bundle id rather than the application name (tell bundle id "XXX"). This would allow suitable code hunks such as osaxen to participate. Perhaps it would be too much to have to bind terminology providers at the top level of a script (as you are doing above) however it would bring a certain amount of clarity to the language. It's the norm in other languages such as Perl, Python, Ruby, and Tcl to use import-like calls at the top level of their scripts.

Yes, I understood what you were suggesting, and I agree something along these lines is a good idea. But not using tell blocks. Instead, for example, you could “import” the term ‘open for access’ and then use it without any tell blocks, and the command would always be sent to the scripting addition within the current process. Nesting tells is going to continue to be a problem unless you somehow change its behavior to eliminate ambiguities.

Binding identifiers as above would imply a URI (somewhat similar to XML namespaces) with the default items being the pre-loaded providers on the local machine. With an eye to even greater usefulness sometime in the future (e.g. iPhone), it might be possible to devise a load-and-bind form:

associate md with provider "http://www.aker.ca/osaxen/MetaData.osax/"

That's interesting, though it would have to require user interaction to authorize, since it's loading executable code from across the Internet. Would it still be useful if it required interactive authentication to run that script?

From a security perspective, I think we might be better off requiring people to download and install that OSAX as they do today.

-- 
Chris Page

 The other, other AppleScript Chris

 _______________________________________________
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

  • Follow-Ups:
    • Re: Tell Blocks Considered Harmful (was Re: open for access)
      • From: Philip Aker <email@hidden>
    • Re: Tell Blocks Considered Harmful (was Re: open for access)
      • From: "John C. Welch" <email@hidden>
References: 
 >Re: open for access (From: "Nigel Garvey" <email@hidden>)
 >Tell Blocks Considered Harmful (was Re: open for access) (From: Chris Page <email@hidden>)
 >Re: Tell Blocks Considered Harmful (was Re: open for access) (From: Philip Aker <email@hidden>)
 >Re: Tell Blocks Considered Harmful (was Re: open for access) (From: Philip Aker <email@hidden>)
 >Re: Tell Blocks Considered Harmful (was Re: open for access) (From: Chris Page <email@hidden>)
 >Re: Tell Blocks Considered Harmful (was Re: open for access) (From: Philip Aker <email@hidden>)

  • Prev by Date: Re: Tell Blocks Considered Harmful (was Re: open for access)
  • Next by Date: Re: Tell Blocks Considered Harmful (was Re: open for access)
  • Previous by thread: Re: Tell Blocks Considered Harmful (was Re: open for access)
  • Next by thread: Re: Tell Blocks Considered Harmful (was Re: open for access)
  • Index(es):
    • Date
    • Thread