Re: Creating list references in handlers. Bad code or bug?
Re: Creating list references in handlers. Bad code or bug?
- Subject: Re: Creating list references in handlers. Bad code or bug?
- From: Deivy Petrescu <email@hidden>
- Date: Sun, 16 Sep 2001 18:49:56 -0400
At 3:19 PM -0700 9/16/01, Jon Pugh wrote:
No, "end" is not the last item, it's the position after the last
item, and it's used for appending items onto a list.
For example:
set x to {1, 2}
set end of x to 3
x
--> {1, 2, 3}
If you want to change the last item, do this:
set x to {1, 2}
set last item of x to 3
x
--> {1, 3}
I don't see a bug, except perhaps that end of x's contents (which is
equivalent to contents of end of x) doesn't error.
Jon
Jon, sorry I am doing to you what Victor did to me (sleepless for a
week), 8-)
but
set x to {1, 2}
set y to (contents of x)
if y = x then beep 5 -- result 5 beeps
so if contents of x is a list, you should also be able to set the end
of it to something, shouldn't you?
This is like quick sand the more I dig the more I get stuck!
Deivy Petrescu
http://www.dicas.com