Re: Coding Protocol?
Re: Coding Protocol?
- Subject: Re: Coding Protocol?
- From: "Jeff Galyan" <email@hidden>
- Date: Sun, 30 Dec 2001 10:42:36 -0700
I think that just means that NSObject, since it is the base class for all
classes in Cocoa, does not itself conform to the NSCoding protocol. If
you're familiar with Java, you know that java.lang.Object doesn't implement
Serializable. Pretty much the same thing here - if you derive from NSObject
and you want your class to implement NSCoding, you have to declare it so
yourself. It's not automatic. That's what p243 of "Learning Cocoa" shows.
The second book you quote from just makes the point that subclassing
NSObject doesn't automatically give you NSCoding support.
--Jeff
On 12/30/01 10:30 AM, "email@hidden" <email@hidden> wrote:
>
From "Learning Cocoa", page 243: @interface ToDoItem : NSObject <NSCoding>
>
>
From "Cocoa Programming for Mac OS X", page 145: "All the commonly used
>
AppKit and Foundation classes implement the NSCoding protocol with the
>
notable exception of NSObject.
>
>
Am I missing something here?
>
>
Brian E. Howard
>
Cocoa Cult Central
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.