Re: Coercion of list to record
Re: Coercion of list to record
- Subject: Re: Coercion of list to record
- From: Skeeve <email@hidden>
- Date: Thu, 07 Feb 2008 16:26:14 +0100
Axel Luttgens wrote:
And in fact, AppleScript has an escape mechanism which could prove
useful for handling cases such as those considered by Skeeve:
Okay... So let's give you another (pathological) case:
set theList to {"is | allowed","no"}
set recordItems to {}
repeat with x from 1 to count theList by 2
set end of recordItems to "|" & item x of theList & "|:\"" &
item (x + 1) of theList & "\"" as string
end repeat
set AppleScript's text item delimiters to ", "
set recordAsString to ("{" & recordItems as string) & "}"
set AppleScript's text item delimiters to ""
run script recordAsString
Yes! I know this is really pathological. But these pathological cases
tend to occure. And when they occure, you will spend hours searching for
the reason for the failure of your script.
More important: You also prooved Chris right, because the pain is now
increasing!
_______________________________________________
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