• 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: Observing managed arrays in custom views?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Observing managed arrays in custom views?


  • Subject: Re: Observing managed arrays in custom views?
  • From: mmalcolm crawford <email@hidden>
  • Date: Tue, 7 Mar 2006 16:02:00 -0800


On Mar 7, 2006, at 3:52 PM, Jonathan del Strother wrote:

I have a Core Data entity 'MovieClip' bound to an NSArrayController's managedObjectContext binding. So far, so good.

Not as described.
You should have an array controller whose 'managedObjectContext' binding is bound to wherever the managed object context is (if you're using NSPersistentDocument, then probably from File's Owner).



I have a subclassed NSView which is intended to display a representation of all the clips in the array. So I need to do - exposeBinding:@"clips" - so that the clips binding appears in the Interface Builder inspector. This then requires the custom view to implement 'setClips' and 'clips' methods

No, it doesn't. Names of bindings can be independent of instance variables, although they often coincide.

When an element is added/removed from the array, I want to update the view. But this doesn't tell us when the contents of an element changes, so we also need to observe each element in the array.
[...]
Secondly, there are a number of Clip attributes that I'm interested in - not just the title. Is there a way of observing all attributes without specifying each one manually?


In essence, no.

For a full example, see <http://homepage.mac.com/mmalc/CocoaExamples/ controllers.html> (Graphics Bindings).

mmalc


_______________________________________________ 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
  • Follow-Ups:
    • Re: Observing managed arrays in custom views?
      • From: Jonathan del Strother <email@hidden>
References: 
 >Observing managed arrays in custom views? (From: Jonathan del Strother <email@hidden>)

  • Prev by Date: Observing managed arrays in custom views?
  • Next by Date: Save data as package
  • Previous by thread: Observing managed arrays in custom views?
  • Next by thread: Re: Observing managed arrays in custom views?
  • Index(es):
    • Date
    • Thread