Search code examples
custom-cellnstableviewcellapplescript-objcnsdatepicker

Can I put a NSDatePicker object in a cell of NSTableView?


Right now I am just using a NSTextCell with a NSDateFormatter, I just wanted to know if this was possible, perhaps by using the .

Thanks in advance!


Solution

  • not without making a bunch of hacking... Apple doesn't provide the date picker cell for the table for some reason. I would keep the date formatter or make it so when the cell is clicked, it pops open the graphical date picker.

    I created a menu in the xib file, set the outlet for the cell's menu property to the menu, created a subclass of nsdatepicker, overrode the mouseDown:, and made it display the menu when clicked.