NSMutableDictionaries as object implementation (was Re: Cocoa Bindings - nondebuggable, non-obvious, procedural ???)
NSMutableDictionaries as object implementation (was Re: Cocoa Bindings - nondebuggable, non-obvious, procedural ???)
- Subject: NSMutableDictionaries as object implementation (was Re: Cocoa Bindings - nondebuggable, non-obvious, procedural ???)
- From: Charlton Wilbur <email@hidden>
- Date: Wed, 5 Jan 2005 20:17:02 -0500
On Jan 5, 2005, at 8:01 PM, Tim Lucas wrote:
I think the CocoaDevCentral article (1) on bindings is misleading
people into thinking their objects should be dictionaries, and IMO it
should be revised to eliminate the public NSMutableDictionary's. This
implementation would be unacceptable in all but demonstration
implementations.
Out of curiosity, why?
In one project, I'm currently representing objects as dictionaries, but
that's because it makes prototyping the model easier and saving them in
a particular file format much more straightforward. All the access is
actually via accessor methods or KVC, so I could easily switch to
instance variables and I'm not committed to the NSDictionary route
long-term, but I've been weighing the issue - do I keep the objects as
dictionaries and write archiving code by hand, or do I write a custom
NSCoder class?
(For some reason, writing theoretical posts about object orientation is
*much* more interesting than working on code tonight.)
Charlton
--
Charlton Wilbur
email@hidden
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden