• 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: Design Question: Bindings & Custom Views
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Design Question: Bindings & Custom Views
      • From: "Oleg Krupnov" <email@hidden>
References: 
 >Design Question: Bindings & Custom Views (From: "Oleg Krupnov" <email@hidden>)
 >Re: Design Question: Bindings & Custom Views (From: "Oleg Krupnov" <email@hidden>)
 >Re: Design Question: Bindings & Custom Views (From: Negm-Awad Amin <email@hidden>)
 >Re: Design Question: Bindings & Custom Views (From: "Oleg Krupnov" <email@hidden>)

  • Prev by Date: Re: Design Question: Bindings & Custom Views
  • Next by Date: Creating Interface
  • Previous by thread: Re: Design Question: Bindings & Custom Views
  • Next by thread: Re: Design Question: Bindings & Custom Views
  • Index(es):
    • Date
    • Thread