• 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: copy & set statements
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: copy & set statements


  • Subject: Re: copy & set statements
  • From: Timothy Bates <email@hidden>
  • Date: Tue, 23 Oct 2001 11:57:35 +1000

On 23/10/01 11:53 AM, "Deivy Petrescu" <email@hidden> wrote:

>> I believe the information below is not correct?
>>
>> set theCat to {"woody", "hungry"}
>>
>> myHandler(theCat)
>> return theCat
>>
>> -->>{"woody", "hungry"}
>>
>> on myHandler(myList)
>> set myList to "a"
>> end myHandler
>
> I believe you meant:
>
> set theCat to {"woody", "hungry"}
>
> set theCat to myHandler(theCat) --alternatively return myHandler(theCat)
> return theCat
>
> -->>a
>
> on myHandler(myList)
> set myList to "a"
> end myHandler

No no. The original writer stated that handlers deal with pointers to lists,
and thus to avoid the original list being altered, one must copy the list
inside the handler and deal with this copy. So my example shows that this is
not the case.


  • Prev by Date: Re: Folder Actions in OS X.
  • Next by Date: RE: copy & set statments
  • Previous by thread: Re: Scaling large images w/ Akua Sweets
  • Next by thread: Re: copy & set statements
  • Index(es):
    • Date
    • Thread