• 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: Thu, 8 Jan 2009 17:44:07 -0800

On Dec 30, 2008, at 1:15 PM, Brennan wrote:

OK this once noble feature seems to be rather deprecated (right?) ...

It is not deprecated, but not many applications implement it. It's entirely an application feature, not something the system provides code for. I encourage all applications to support attach-ability -- or a script menu at the very least.


If I do 'open for access' inside a script run from BBEdit's script menu, am I making an 'unnecessary dependency'?

Not really. As long as the script doesn't send "open for access" to some other application, it's basically fine. It's okay for a given program to read or write files, but it's risky for it to ask some other program (which may have different privileges, etc.) to access files on its behalf. When a program runs a script within its process, that script is running as part of the application and can do (pretty much) whatever the application can do, since it's operating with that program's privileges.


Now, if your script doesn't want to depend on the privileges of the application running it, it's even better if the script isn't actually run inside that application's process. One way to do this is to use a script application instead of a bare script, assuming the host application supports running script applications (any application with a script menu should). Then the script will always run in its own application process and have zero dependencies on the host application's privileges or other state. Of course, the point of having a script menu is usually to run bare scripts as part of the application.

--
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
  • Prev by Date: Re: How would I trim off 5 inches from the right side of a PDF in Acrobat using AppleScript?
  • Next by Date: Re: Script to save webloc
  • Previous by thread: Re: How would I trim off 5 inches from the right side of a PDF in Acrobat using AppleScript?
  • Next by thread: Iterating over items in a record, possible?
  • Index(es):
    • Date
    • Thread