• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Unicode text and class URL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >Unicode text and class URL (From: Bill Hoffman <email@hidden>)
 >Re: Unicode text and class URL (From: Walter Ian Kaye <email@hidden>)
 >Re: Unicode text and class URL (From: Sander Tekelenburg <email@hidden>)
 >Re: Unicode text and class URL (From: Christopher Nebel <email@hidden>)

  • Prev by Date: Re: Unicode text and class URL
  • Next by Date: Re: Unicode text and class URL
  • Previous by thread: Re: Unicode text and class URL
  • Next by thread: Re: Unicode text and class URL
  • Index(es):
    • Date
    • Thread