• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Coding Protocol?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >Coding Protocol? (From: email@hidden)

  • Prev by Date: Re: Coding Protocol?
  • Next by Date: Re: Apple's Address Book File Format
  • Previous by thread: Re: Coding Protocol?
  • Next by thread: Re: Setting a file's icon
  • Index(es):
    • Date
    • Thread