• 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: NSArrayController observing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSArrayController observing


  • Subject: Re: NSArrayController observing
  • From: mmalcolm crawford <email@hidden>
  • Date: Fri, 5 Dec 2003 20:54:19 -0800

On Dec 5, 2003, at 8:01 PM, Kurt Marek wrote:

I have an NSArrayController (blocksArrayController) with it's content
set to selection.blocksArray on another NSArrayController
(itemArrayController). The NSColumns in blocksTableView are bound to
blocksArrayController. The problem is the table doesn't update when I
use addObject on blocksArray:
[blocksArray addObject:newBlock];
itemArrayController is being observed by it's own NSTableView which
immediately shows the newly added 'newBlock'. If I change the selection
of itemArrayController (through it bound NSTableView) and then select
the newly added item again, I can eventually get the blocksTableView to
display correctly for the newly added 'newBlock'.
Any ideas?

Try:
[blocksArrayController addObject:newBlock];

or if you want to initialise a new Block in the array controller itself, subclass and implement -newObject.

This thread is somewhat relevant:
<http://cocoa.mamasam.com/COCOADEV/2003/11/1/76820.php>

mmalc
_______________________________________________
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: 
 >NSArrayController observing (From: Kurt Marek <email@hidden>)

  • Prev by Date: NSArrayController observing
  • Next by Date: Re: Font Panel Events Getting Blocked
  • Previous by thread: NSArrayController observing
  • Next by thread: Sorting a list in NSTableView
  • Index(es):
    • Date
    • Thread