Re: list as string - is this a bug?
Re: list as string - is this a bug?
- Subject: Re: list as string - is this a bug?
- From: Doug McNutt <email@hidden>
- Date: Thu, 8 Sep 2005 12:19:31 -0600
At 09:20 -0700 9/8/05, Matt Neuburg wrote:
>set L to {"hoo", "ha"}
>L as string -- "hooha"
>set L2 to {"hoo", item 2 of L}
>L2 as string -- "hooha"
>-- so far so good...
>-- but now...
>{"hoo", item 2 of L} as string -- "hoo"
I think it's called "data sharing" or some other phunny phraseology in the AppleScript Language guide.
For lists and records set doesn't mean set as in other languages. It's quite possible to be working with a pointer to the original list which gets changed because the memory is shared.
Try using copy instead of set. They're not the same for lists or items in lists.
--
Applescript syntax is like English spelling:
Roughly, but not thoroughly, thought through.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden