Re: Design Question: Bindings & Custom Views
Re: Design Question: Bindings & Custom Views
- Subject: Re: Design Question: Bindings & Custom Views
- From: Cathy Shive <email@hidden>
- Date: Thu, 28 Aug 2008 12:03:24 +0200
On Aug 28, 2008, at 11:06 AM, Oleg Krupnov wrote:
In other words, I need a way to associate additional
custom-view-specific properties with model object, without adding them
as transitive properties to the model. What is the best way to do
this? Or maybe your point is that this is a bad idea at all and such
problem should not arise, and I need to include everything in the
model? What is the standard workaround suggested in Cocoa?
Hi Oleg,
I think there are times when it's appropriate to have wrapper objects
- that are view related - for your model objects. In an image
browser, it's likely that there is a "thumbnail" object that draws
"image" objects.
So maybe your custom view creates "thumbnails" for the shapes it
needs to draw and keeps the view-related properties and states in
those objects - instead of adding them to the shape objects
themselves? It's a little crude - but from what I can understand
about your problem - it could be a place for you to start separating
the model and view in your design.
HTH,
Cathy
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden