defaults entry array problem in 10.3.9

I have a defaults entry whose contents is an array. Works just fine in Tiger. 10.3.9, not so much. The contents of the default entry array contains all strings, eg name is “Names”, content is {“Mom”,“Dad”,“Lucy”}. Whenever I attempt a ‘contents of default entry “Names” of user defaults’ during testing the app in Panther, I get an NSReceiverEvaluationAppleScriptError. I hate those. I’ve searched around but is there something about 10.3.9 I don’t know about? Much obliged for any thoughts as always.

Upon further experimentation it looks like a default entry array text item that contains an apostrophe (and perhaps other characters) screws up the get contents command in 10.3.9. Seems to work in 10.4 because “contents of default entry…” returns Unicode text? Requires more experimentation.

I haven’t tried a workaround I have in mind: use a do shell script “defaults read…” command rather than the Xcode “contents of default entry someEntry of user defaults” command.

(According to Jobs at 6/11/07 WWDC keynote, only 25% or so of users are still using Panther. Makes one consider considering abandoning Panther compatability in the near future.)

Hi Doug,

wouldn’t it be easier to avoid “screwing up” characters in the .plist files? :wink:

Not if I don’t have control over them or if it’s too much trouble converting bad chars. :slight_smile:

What I’m doing is gathering the names of Shared Libraries in iTunes. The default name for any shared library is the user’s name followed by an apostrophe, like “StefanK’s Music”. Additionally, Apple creates that default name using a high-ASCII “smart” single quote. Unless a user specifically changes the name of his shared library (in iTunes Preferences), I’m stuck with the apostrophe problem in 10.3.9…high or low ASCII notwithstanding.