Re: String to list conversion
Re: String to list conversion
- Subject: Re: String to list conversion
- From: Christopher Nebel <email@hidden>
- Date: Tue, 14 Sep 2004 17:35:24 -0700
On Sep 14, 2004, at 11:45 AM, John W. Baxter wrote:
1. It is *likely* possible if one is dealing with one's own machine
to make a non-change change to the formattting preferences (that is,
change something and change it back). [A possible implementation
would notice that the change just made to the preferences returned
them to the default state and discard the plist file. I would not
expect the programmers to have bothered, particularly since the
default state varies by localization of the machine. That's why the
*likely*.]
2. Item 1 isn't helpful if Gnarlie is trying to write a script which
will
work on any machine.
If the point is to save and restore the font preferences, then the
correct response to seeing that there is no default value is to set it
back to nothing when you're done. (Preferably via "defaults delete"
rather than blowing away the entire file -- there may be other
information in there, too.) This should work correctly for some time,
though the official route is still the API.
3. The right way for code to learn the formatting preferences is to
ask the
scripting component for them. It's been years since I cared...I once
knew
what the API call and result looked like, but what I knew is likely
stale
anyhow.
Actually, it's still the same as it's always been: ASGetSourceStyles.
At some point, we'll probably have to change it to deal with more
modern font APIs, but that hasn't happened yet.
Since there's already an active bug whose outcome will be that there
is always a plist file, there's not much point in expressing fresh
wishes for that.
If you're referring to the bug I mentioned, then you misunderstood me.
What I said was that the default values would no longer be embedded in
the code; that's not the same thing as guaranteeing that there will be
a plist file in ~/Library/Preferences.
--Chris Nebel
AppleScript Engineering
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden