• 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: Subject: clear set property on each run
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Subject: clear set property on each run


  • Subject: Re: Subject: clear set property on each run
  • From: "Stockly, Ed" <email@hidden>
  • Date: Tue, 24 Feb 2015 22:59:53 +0000
  • Thread-topic: Subject: clear set property on each run

I use properties all the time for variables that need to be accessible by
numerous handlers.

I find using properties simpler than sending/returning/resetting local
variables in every handler call and reply. (although I know that's
considered a better practice).

I reset the values I don't want to be persistent, but not on quit, I do it
first thing when the script launches.

The whole scheme of having properties and globals maintain persistent
values has been criticized before, and writing back to a script app has
also raised eyebrows, but now I'm wondering if it's going to become a real
issue one day?

ES



On 2/24/15, 2:52 PM, "David Crowe" <email@hidden> wrote:

>Kris;
>
>Why use a property?
>
>Why not just "set theList to {}"?
>
>Then it will disappear at the end of the script.
>
>- David Crowe
>
>
>> Date: Tue, 24 Feb 2015 10:22:43 +0000
>> From: Kris Decker <email@hidden>
>> To: email@hidden
>> Subject: clear set property on each run
>> Message-ID: <email@hidden>
>> Content-Type: text/plain; charset=utf-8
>>
>> If I have set a property (property theList : {}) before the script
>>runs, how can I clear the property of it’s value (received from running
>>the script) so the value returns to nothing for the next run of the
>>script. Basically, I don’t want the data to persist.
>>
>> thanks


 _______________________________________________
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: Subject: clear set property on each run
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: clear set property on each run
  • Next by Date: Re: Subject: clear set property on each run
  • Previous by thread: Re: clear set property on each run
  • Next by thread: Re: Subject: clear set property on each run
  • Index(es):
    • Date
    • Thread