Re: coerce record to string - does this work in other System languages?
Re: coerce record to string - does this work in other System languages?
- Subject: Re: coerce record to string - does this work in other System languages?
- From: Emmanuel LEVY <email@hidden>
- Date: Thu, 25 Mar 2010 22:27:10 +0100
I wrote this little handler to coerce a record into a string. It
works with "German" as System language. Does it work with other
languages too? Who can test?
display dialog to_String(info for POSIX file "/tmp")
on to_String(the_record)
try
{a:0} as string
on error cutoff
set cutoff to 4 - (length of cutoff)
end try
As has been noticed, in some languages it's more complicated. I think
that the version below works along your idea, but it should work in
"most" languages.
on to_String(the_record)
try
{a:"x"} as text
on error s
set i to offset of "{a:\"x\"}" in s
set j to i + 5 - (s's length)
end try
try
the_record as text
on error s
text i thru j of s
end try
end to_String
Emmanuel
_______________________________________________
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