I have subclassed NSControl to get my custom control,
have subclassed NSCell to get my custom cell,
over overridden -(BOOL)trackMouse:inRect:ofView:untilMouseUp
and necessary methods
in custom cell,
have overridden + (Class)cellClass
in customControl to return my customCell,
Cell draws fine on control, set enable, set dissable works fine, but
Mouse events not getting triggered.
While debugging i noticed that -(BOOL)trackMouse:inRect:ofView:untilMouseUp:
is never invoked. As per "Control and cell programming guide" -
"Controls manage the behavior of their cells. By inheritance from NSView, controls derive the ability for responding to user actions and rendering their on-screen representation. When users click on a control, it responds in part by sending
trackMouse:inRect:ofView:untilMouseUp:
to the cell that was clicked"
Kindly tell if i am missing something - i have googled a lot got nothing useful.
Have a look at this example here https://github.com/mtavkhelidze/MTControlWithCell