Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

satyam90

macrumors regular
Original poster
Jul 30, 2007
242
0
Bangalore, India
Hi, I am using Cocoa famework with Obj C.
I have a NSTableView control in my panel. I want to have a delegate or some method which will check for the contents of the table view, when empty it should close the panel. I know how to close the panel. But I am searching for some delegate which will check the nil entries in the table view.
(I am using some other nib controllers array controller to add/delete entries in panel's table view.)
 

HiRez

macrumors 603
Jan 6, 2004
6,265
2,630
Western US
Hi, I am using Cocoa famework with Obj C.
I have a NSTableView control in my panel. I want to have a delegate or some method which will check for the contents of the table view, when empty it should close the panel. I know how to close the panel. But I am searching for some delegate which will check the nil entries in the table view.
(I am using some other nib controllers array controller to add/delete entries in panel's table view.)
Maybe you could override on of the array controller's methods (like arrangedObjects: or something that's called periodically by the bindings system), and check for emptiness there?

EDIT: Or maybe override numberOfRowsInTableView: from the table view's data source, which I think gets called before it gets display updates.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.