• 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: OutlineView to TableView to TextView binding, oh my...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OutlineView to TableView to TextView binding, oh my...


  • Subject: Re: OutlineView to TableView to TextView binding, oh my...
  • From: Fritz Anderson <email@hidden>
  • Date: Thu, 6 May 2004 10:05:34 -0500

The change to the bound array has to be made known to the observers. The regular NSMutableArray mutators do not trigger the key-value observing events. Bracket the change to the array with willChangeValueForKey: and didChangeValueForKey: (or, better, will/didChange:valuesAtIndexes:forKey:).

Or, add the selected item not to the array directly, but to the result of mutableArrayValueForKey:, which returns a proxy that does the KVO notifications.

-- F

On 5 May 2004, at 7:02 PM, Carl Sziebert wrote:

Currently I am checking for a selection in the OutlineView and adding the selected item to the array of objects displayed by the TableView. According to expectation, when I select an item in the TableView, I should see the contents rendered in the TextView. I can see that the selected item gets added to the array, however nothing is displayed in the TableView. So that leads me to question how to properly bind to the TableView/array.
--
Fritz Anderson
Consulting Programmer
http://resume.manoverboard.org/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >OutlineView to TableView to TextView binding, oh my... (From: Carl Sziebert <email@hidden>)

  • Prev by Date: Re: Adding Document Types Programmatically
  • Next by Date: Re: NSValueTransformer subclass doesn't recognise copyWithZone. So?
  • Previous by thread: Re: OutlineView to TableView to TextView binding, oh my...
  • Next by thread: Re: Cocoa and glutMainLoop()?
  • Index(es):
    • Date
    • Thread