Re: TID's in Snow Leopard
Re: TID's in Snow Leopard
- Subject: Re: TID's in Snow Leopard
- From: Axel Luttgens <email@hidden>
- Date: Sun, 30 Aug 2009 16:47:29 +0200
Le 30 août 09 à 15:40, Luther Fuller a écrit :
Here is a small snippet of code I've been using for years without
error in 10.4 and 10.5 ...
set x to ""
set AppleScript's text item delimiters to {tab}
set y to (text item 1 of x)
If x = "", then y = "" without error. But, in 10.6 the last line
returns the error message
Can't get text item 1 of "".
It took me more than an hour to find this one line of code.
The problem is to decide whether it is conceptually right to consider
that the empty string has a text item: can an empty string be
decomposed into chunks?.
And things were even a bit more complicated under Tiger, since one had:
text items of ""
--> {}
text items of ("" as unicode text)
--> {""}
when the TIDs had their default value.
Perhaps have you been somewhat lucky under 10.4... ;-)
In fact, according to the result you have described, it seems that
10.6 just reverted to the behavior that AppleScript has always obeyed
up to 10.3.
Axel _______________________________________________
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