• 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: ListWillNotEmpty
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ListWillNotEmpty


  • Subject: Re: ListWillNotEmpty
  • From: 2551 <email@hidden>
  • Date: Fri, 08 Nov 2013 19:05:58 +0700

I have the following:

set displayList to {}
set displayList to the mainList
set beginning of displayList to "----"

Each time I run the script the "----" keeps getting added cumulatively to displayList even though displayList should be emptied out. Meanwhile mainList occurs only once. Any idea why this is happening... a bug or is it the Tao of AS?


I don’t think its possible to produce that result with the code you posted, but you could if somewhere else you have set mainList to displayList and declared mainList as a property. 
For example, I can reproduce your problem like this:

property mainList : {} 

set displayList to {}
set displayList to the mainList
set beginning of displayList to "----"
set mainList to displayList
mainList





 _______________________________________________
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

References: 
 >ListWillNotEmpty (From: "DigitEL @ Shaw" <email@hidden>)
 >Re: ListWillNotEmpty (From: Axel Luttgens <email@hidden>)
 >Re: ListWillNotEmpty (From: "DigitEL @ Shaw" <email@hidden>)

  • Prev by Date: Re: Some Way to Run an AppleScript from an ExtendScript Command?
  • Next by Date: RE: FMPro to Contacts (AddressBook)
  • Previous by thread: Re: ListWillNotEmpty
  • Next by thread: Some Way to Run an AppleScript from an ExtendScript Command?
  • Index(es):
    • Date
    • Thread