Re: NSArrayController observing
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.