[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

mmalc's Controller examples



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