Re: Coding Protocol?
Re: Coding Protocol?
- Subject: Re: Coding Protocol?
- From: Finlay Dobbie <email@hidden>
- Date: Sun, 30 Dec 2001 17:40:52 +0000
On Sunday, December 30, 2001, at 05:30 pm, 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?
Obviously yes, you are. The line:
@interface ToDoItem : NSObject <NSCoding>
declares the interface for the ToDoItem class, which inherits from
NSObject and implements to the NSCoding protocol. NSObject still doesn't
implement to the NSCoding protocol, it's your class that does.
-- Finlay