Text and Unicode Text
Text and Unicode Text
- Subject: Text and Unicode Text
- From: Luther Fuller <email@hidden>
- Date: Wed, 9 May 2007 15:33:30 -0500
As you know, because I've posted many comments here, I have this
large AppleScripted application (more than 1500 lines) that keeps
pooping an incomprehensible error just often enough to keep me
worried, but so rarely that I can't find a source.
I have suspected that Unicode is involved in some way. Today, after
yet another error (NSReceiverEvaluationScriptError:4) that made
little sense, but was reproducible, I decided to try an experiment.
First, I went thru my code and removed the phrase " as Unicode text"
wherever it appeared and modified the code as necessary. Whenever
Unicode text is written by the Finder to a file name or comment; by
System Events to a .plist file; to dialog text; or to name an object
in an application, text is automatically converted to Unicode. You
don't have to explicitly use Unicode text.
I tested my code, only to find that I still had a problem. However ...
Second, I went thru my code to find where I had read Unicode from a
file name or comment or read the name of an application object. I
added the phrase "... as text" after these references with
modifications to code as necessary. At this point, there should be no
Unicode text within my script.
I tested my code again and it worked. No error. Have I really fixed
my problem? I'm going to live with it for a week or so and see what
happens.
_______________________________________________
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