• 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: Script application "bundles" that are read-only: error when quitting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Script application "bundles" that are read-only: error when quitting


  • Subject: Re: Script application "bundles" that are read-only: error when quitting
  • From: "Gary (Lists)" <email@hidden>
  • Date: Mon, 18 Jul 2005 00:48:46 -0400

"Paul Berkowitz" wrote:

> On 7/17/05 7:23 PM, "Stephen Jonke" <email@hidden> wrote:
>
>> Is this a known bug? If a script application was saved as an
>> "Application bundle" and then the script is run with read-only
>> privileges, you get an error at quit saying that it can't save
>> changes to the script. Specifically:
>>
>>> -5000: Could not save changes to this script because you do not
>>> have the necessary access privileges
>>
>>   If the script is saved instead as an "application" (not a bundle),
>> you don't get this error message, instead it just doesn't save
>> changes to properties at quit. That's the behavior I want. Is there
>> any way to work around this issue for application bundles? I want to
>> use a bundle so I can have a real icon, version information in Get
>> Info, etc, but now if a user without write privileges to the script
>> application bundle runs it, they get this error at quit.
>>
>> Note that I tried putting "ignoring application responses" around a
>> "continue quit" statement in a quit handler, but this didn't work.
>> Nor did "try".
>
> Are there any script properties that need to be saved between script runs?
> If so, consider making a preferences file and save them there instead. It
> could be a .plist file using 'do shell script "defaults write"', or you can
> just save them in a file using 'write' standard addition and read them back.

Paul and others,

I'm not much of an "application maker" per se (meaning stand-alone
applications, made with fancy tools and UI-makers and such) but since I do
write lots of scripts that are saved as applications, and since each one of
those creates its own ".plist" file (which does seem wasteful), should I be
using that .plist file for the things that I currently write to a "standard"
text file?  Or is it six of one, half-dozen of the other?

A handful of my daily use scripts (saved as applications) keep their own
preferences file, usually in the same folder as the application.  More
scripts write to and read from files I create and destroy in the user 'tmp'
folder, which seems appropriate for the disposables.

As I put more of my scripts into a "portability" mode, should I steer away
from the 'text file' read/write for the preferences and then use the
auto-created .plist file for storing?

The How-To's I can go figure, but I'm just wondering if it really matters if
I continue to write small preference bits to a 'text file' and not an XML
file (.plist).  [XML seems like over-kill for so many things.]

Thanks for any 'best practice' guidance.
--
Gary

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Script application "bundles" that are read-only: error when quitting (From: Paul Berkowitz <email@hidden>)

  • Prev by Date: Re: Script application "bundles" that are read-only: error when quitting
  • Next by Date: Re: Using the document element in TextEdit
  • Previous by thread: Re: Script application "bundles" that are read-only: error when quitting
  • Next by thread: Re: Script application "bundles" that are read-only: error when quitting
  • Index(es):
    • Date
    • Thread