[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
mmalc's Controller examples
- Subject: mmalc's Controller examples
- From: mmalc_lists at mac.com (mmalcolm crawford)
- Date: Mon Mar 1 02:46:22 2004
- In-reply-to: <2953A036-69DE-11D8-B191-000A95DA3C6A@mac.com>
- References: <CCF2426D-61E1-11D8-A541-000A95DA3C6A@mac.com> <265BC802-668E-11D8-B751-000A95DA3C6A@mac.com> <FD18A497-6972-11D8-8544-000A95DA3C6A@mac.com> <2953A036-69DE-11D8-B191-000A95DA3C6A@mac.com>
One more:
<http://homepage.mac.com/mmalc/CocoaExamples/ControlledPreferences.zip>
Uses NSUserDefaultsController to manage a number of preferences -- a
string, a number, a color, and a font. The combination is displayed as
a preview. To be stored in user defaults, the color must be archived;
a standard value transformer is used to archive and unarchive the
color. The font information is stored as a pair of values -- font name
and size. The name is the NSFont's fontName, however a custom value
transformer is used to retrieve the font's displayName for display.
The font details are presented using a text field's displayPatternValue
binding.
mmalc