-
Notifications
You must be signed in to change notification settings - Fork 0
NSTableView
Brent Simmons says he doesn't allow autolayout in table cell views. I'm not religious about it, but I do recognize that autolayout is not always the fastest method, and table cells need to be fast. This depends on many factors, like if your table will only ever have 5-10 items, or if it may contain a million items. Autolayout buys you a bunch of functionality by default, like RTL support, which may or may not be important to you.
The clickedRow
docs say:
The index of the row the user clicked to trigger an action message. Returns –1 if the user clicked in an area of the table view not occupied by table rows.
However, it can be (as of 10.15) -1 in other cases. Consider:
- Take an NSTableView with 2 rows
- Select both rows
- Select just the 2nd row
- Right-click the 2nd row (e.g., to choose a menu)
In a menuitem action, while the selection is changing, clickedRow is -1, even though you only ever clicked on rows. If you set it settle for a second, then clickedRow will again be correct (1).