Re: Initial Prefs Setting Of Checkbox?
Re: Initial Prefs Setting Of Checkbox?
- Subject: Re: Initial Prefs Setting Of Checkbox?
- From: Matt Neuburg <email@hidden>
- Date: Wed, 31 Dec 2008 09:34:05 -0800
- Thread-topic: Initial Prefs Setting Of Checkbox?
On Tue, 30 Dec 2008 23:25:03 -0500, "Chunk 1978" <email@hidden> said:
>i have a few checkboxes in my prefs window which are bound... however,
>i was under the impression that i could easily set the very first load
>state of these boxes in IB by checking "Selected" (Inspector >
>Attributes > Visual > Selected) before the userdefaults are written...
There are two misunderstandings here, and the most important of them is the
second one, "before the user defaults are written". There should be NO SUCH
TIME. It is up to you register the default defaults (that is, the "initial"
value for user defaults before the user has had any chance to express an
opinion) before the app even finishes loading for the first time. That is
exactly what "registerDefaults" is for. In some cases, finding a
sufficiently early entry point can be a challenge; I typically resort to
+initialize.
m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
One of the 2007 MacTech Top 25: <http://tinyurl.com/2rh4pf>
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden