NSTableView - Delegate when empty?

Discussion in 'Mac Programming' started by satyam90, Apr 13, 2008.

  1. macrumors regular

    satyam90

    Joined:
    Jul 30, 2007
    Location:
    Bangalore, India
    #1
    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.)
     
  2. macrumors 601

    HiRez

    Joined:
    Jan 6, 2004
    Location:
    Western US
    #2
    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.
     
  3. macrumors G4

    Eraserhead

    Joined:
    Nov 3, 2005
    Location:
    UK
    #3
    That only works for the data source.
     

Share This Page