Re: Unicode text and class URL
Re: Unicode text and class URL
- Subject: Re: Unicode text and class URL
- From: Michelle Steiner <email@hidden>
- Date: Tue, 23 Mar 2004 01:15:23 -0700
On Mar 23, 2004, at 1:03 AM, Christopher Nebel wrote:
Wrong. AppleScript's "string" class may contain style information,
and when converting from Unicode text, always does, because the
encoding is implied by the style. "string" does not equal "plain
text", and never has.
On the applescript newsgroup, someone else ran into a similar problem.
Here is his message:
-- Michelle
set sValue to text returned of (display dialog "Enter the new value for
Keywords:" default answer "")
tell application "Extensis Portfolio 6.1"
--This line works:
set field "keywords" of every record of selection of front gallery to
"dragon"
--This line does not work:
set field "keywords" of every record of selection of front gallery to
sValue
end tell
The last "set" command returns the error:
Portfolio got an error: Some data was the wrong type.
Unicode text. That's the class of the sValue returned from the dialog,
even
when you type "dragon" into it. (Portfolio insists on a string.)
However, even after sValue is coerced with:
(sValue as string) or (sValue as text)
Portfolio complains that sValue "is of the wrong type"
--
If you don't hit any bumps in the road, you're not moving.
_______________________________________________
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.