• 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: How to get objects to not be encoded with NSArchiver
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get objects to not be encoded with NSArchiver


  • Subject: Re: How to get objects to not be encoded with NSArchiver
  • From: Chris Hanson <email@hidden>
  • Date: Tue, 2 Apr 2002 18:22:17 -0600

At 1:36 AM -0700 4/2/02, Rosyna wrote:
I have a menu I'm archiving to a data stream with NSArchiver.

Why are you archiving the menu? You shouldn't be archiving View objects unless you're writing an interface creation tool like Interface Builder. Rather, you should be archiving the Model objects that your human interface is providing a View to.

A good rule of thumb in Model-View-Controller design is to always *populate* your human interface *from* data, don't *use* your human interface to *store* data.

(Unfortunately, a lot of common class libraries don't do very much to encourage Model-View-Controller design, even though they do support it. This makes it hard for developers using those frameworks to deliver on object-oriented development's promised benefit of reuse. Cocoa is very different in that respect; it's easier to use MVC than it is to try and make it work like other frameworks, which results in more opportunity for reuse.)

-- Chris

--
Chris Hanson | Email: email@hidden
bDistributed.com, Inc. | Phone: +1-847-372-3955
Mac OS X & WebObjects Consulting | Fax: +1-847-589-3738
http://bdistributed.com/ | Personal Email: email@hidden
_______________________________________________
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: 
 >HI !!! (From: Alessandro Cottarelli <email@hidden>)
 >How to get objects to not be encoded with NSArchiver (From: Rosyna <email@hidden>)

  • Prev by Date: Re: Malloc()
  • Next by Date: Toplevel Objects in NIB files
  • Previous by thread: How to get objects to not be encoded with NSArchiver
  • Next by thread: Re: How to get objects to not be encoded with NSArchiver
  • Index(es):
    • Date
    • Thread