Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

Next Page > Hide TOC

NSCoder Additions Reference

Inherits from
Framework
/System/Library/Frameworks/AppKit.framework
Companion guide
Declared in
NSColor.h

Overview

This category adds a single method to the Foundation framework’s NSCoder class. This method, decodeNXColor, is used to convert archived NXColor structures into NSColor objects.

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.

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

Tasks

Decoding NXColor Structures

Instance Methods

decodeNXColor

Decodes a color structure from NEXTSTEP Release 3 or earlier and returns an NSColor object.

- (NSColor *)decodeNXColor

Return Value

An autoreleased NSColor object. Returns nil if the archived color is invalid.

Discussion

This method does not have a matching method for encoding an NXColor structure. Encode an NSColor object instead.

Availability
Declared In
NSColor.h

Next Page > Hide TOC


Last updated: 2006-05-23




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice