I have an app that contains an NSTableView
instance with 2 columns. One column, is an instance of this:
#import <Cocoa/Cocoa.h>
@class NSTableView;
@interface MMCheckboxTableCellView : NSTableCellView
@property (weak) IBOutlet NSButton *checkboxField;
@end
and the implementation is all boilerplate with no custom code added at all. In code, the NSTableView instance sets tableview.enabled = YES
(or NO) programmatically based on various state of the app. When tableview
is disabled, the other column of the table, which is display only, stops responding to click actions, as expected. The checkbox column, above, continues to respond to clicks and lets the user check/uncheck the button instances.
To try to troubleshoot this, I added a Text Field (it's not hooked up to anything) in the the checkbox column and when the tableview is disabled, it isn't possible to enter text into the field. Is there something special about NSButton that I'm missing? Is it possible that because I derived this class from NSTableCellView with an added Check Box rather than using a Check Box Cell I'm running into this problem?