> 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.

Yeah, maybe "view-related wrapper objects for model objects" is the right term.

In your image browser example, this problem sounds as follows: where
to store the cached thumbnail images, to avoid re-creating them anew
in each drawRect call? Also, if a thumbnail is in process of dragging
inside the custom view, where to save the flag that the thumbnail
should be highlighted, the next time we draw it in drawRect?

I thought this kind of problem should be well-known and commonplace
among Cocoa developers...

> 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.

I am not sure I understood this phrase. Why is it crude? Anyway, I am
looking to solve the problem in the standard way, not reinvent
anything.


On Thu, Aug 28, 2008 at 1:03 PM, Cathy Shive <[EMAIL PROTECTED]> wrote:
>
> 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,
>
>

>
> 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