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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to