Re: global variables
Re: global variables
- Subject: Re: global variables
- From: Luther Fuller <email@hidden>
- Date: Wed, 17 Jul 2013 17:23:51 -0500
On Jul 17, 2013, at 4:57 PM, Kaydell Leavitt wrote: On Jul 17, 2013, at 2:13 PM, Luther Fuller < email@hidden> wrote: This means that the application (bundle) is self modifying.
Which, in turn, means that use of global variables will interfere with, for example, codesigning and perhaps other security measures used in Lion or Mt Lion.
I see.
These self-modifying apps that Apple's AppleScript Editor makes, isn't Apple breaking its own rules?
I think this is a case of Apple not thinking thru the consequences of making globals persistent. It isn't necessary, but it has been so since the beginning of AppleScript and we are stuck with it. I would think that apps shouldn't modify themselves, and that they shouldn't even create files in the same directory as they are running in, that apps should save their state in the following location:
~/Library/Saved Application State/<bundle ID>.savedState
I just checked this and found that only one of my applications has a folder within ~/Library/Saved Application State/, but it is empty. I don't know how it got there. What do I need to do in code to put something there? Is there a reference document on this?
When my applications need to save data, I use a preference (.pist) file in the preferences folder.
|
_______________________________________________
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