Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.