Developer Documentation
PATH  Mac OS X Documentation > Application Kit Reference: Objective-C

Table of Contents

NSCoderAdditions


Inherits from:
NSObject
Declared in:
AppKit/NSColor.h




Class Description


This category adds a single method to the Foundation framework's NSCoder class. This method, decodeNXColor, is used to convert archived NXColors into NSColors.

NXColor, a type that dates from pre-OpenStep versions of NEXTSTEP, was a struct. Its replacement, NSColor, is a class. The difficulties of converting from a struct to a class require a special method like decodeNXColor.

decodeNXColor becomes part of the NSCoder class only for applications that use the Application Kit.

For more information, see the NSCoder class specification in the Foundation Framework Reference.




Instance Methods



decodeNXColor

- (NSColor *)decodeNXColor

Decodes a color object from NEXTSTEP Release 3 or earlier and returns an autoreleased NSColor object. Returns nil if the archived color is invalid. This method does not have a matching method for encoding an NXColor object. Encode an NSColor object instead.


Table of Contents