Re: Trimming down a list
Re: Trimming down a list
- Subject: Re: Trimming down a list
- From: Arthur J Knapp <email@hidden>
- Date: Thu, 11 Apr 2002 09:50:43 -0400
>
Date: Wed, 10 Apr 2002 17:08:17 +0100
>
Subject: Re: Trimming down a list
>
From: Steve Thompson <email@hidden>
>
on 10/4/02 4:22 pm, Paul Berkowitz at email@hidden wrote:
>
>
> if thisItem is not in k then set end of k to thisItem
>
I changed it to:
>
>
if thisItem is not in k then set k to k & thisItem
>
And it works. Is that a bug or does list not understand end of?
So you are saying that:
>
> if thisItem is not in k then set end of k to thisItem
doesn't work?
Is your list a list of sublists? If so, there are additional
steps you want to take:
if {thisItem} is not in k then set end of k to thisItem
The ( {item} is in list ) syntax is nessesary for robust testing.
Bill Cheeseman's website has an explaination somewhere of why this
is:
<
http://www.AppleScriptSourceBook.com/>
The "set end of list to item" should not need any modification,
(unless you are trying to "flatten" the sublists, which is what
happens when you say "set list to list & sublist").
P.S. Of course, by the time this email gets to the list server, Paul
Berkowitz will have already posted 15 new messages to the thread.
;-)
{ Arthur J. Knapp, of <
http://www.STELLARViSIONs.com>
<
mailto:email@hidden>
try
<
http://www.esglabs.com/>
on error number -128
end try
}
_______________________________________________
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.