• 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: Properties of junked script objects persist if referenced
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Properties of junked script objects persist if referenced


  • Subject: Re: Properties of junked script objects persist if referenced
  • From: Chris Espinosa <email@hidden>
  • Date: Tue, 16 Jul 2002 16:16:10 -0700

On Tuesday, July 16, 2002, at 03:52 PM, Nigel Garvey wrote:

Just how much of what is saved back to the file in this case?

Without quoting the entire illuminating original post, I'll just give you the answer. You came very close to figuring it out yourself, in fact, you even demonstrated the key issue:

the result's contents
--> {6, 7, 8, 9, 10}

'result' is a property of the script's context.

And when a script is saved, it's saved with all the properties of its context, and therefore is saved with the last result of its execution, if any. This can often result in saved scripts being much larger than anticipated (and containing unexpected and occasionally personal information).

The solution to this is to ensure that the 'run' handler doesn't return anything in scripts you intend to distribute or save in applets.

Chris Espinosa
Apple
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Properties of junked script objects persist if referenced (From: Nigel Garvey <email@hidden>)

  • Prev by Date: Properties of junked script objects persist if referenced
  • Next by Date: Re: Passing *possible* variables to a handler
  • Previous by thread: Properties of junked script objects persist if referenced
  • Next by thread: Re: Properties of junked script objects persist if referenced
  • Index(es):
    • Date
    • Thread