Following Peters advice:
Consider using a single-segment NSSegmentedControl. It has this
behavior built-in.
I am not completely satisfied: I want the NSOnState shown as done in
an NSButton with buttonType = NSOnOffButton and bezelStyle =
NSTexturedSquareBezelStyle.
In the header file I
On 17 Dec 2008, at 00:56, Stéphane Sudre wrote:
On Dec 16, 2008, at 4:02 PM, Gerriet M. Denkmann wrote:
I am trying to build a pressable button: an on-off button (subclass
of NSButton), which, if pressed for more than 0.3 seconds, displays
a context menu.
My idea was:
Start a non
On Dec 16, 2008, at 7:02 AM, Gerriet M. Denkmann wrote:
I am trying to build a pressable button: an on-off button (subclass
of NSButton), which, if pressed for more than 0.3 seconds, displays
a context menu.
Consider using a single-segment NSSegmentedControl. It has this
behavior built
On Dec 16, 2008, at 4:02 PM, Gerriet M. Denkmann wrote:
I am trying to build a pressable button: an on-off button (subclass
of NSButton), which, if pressed for more than 0.3 seconds, displays
a context menu.
My idea was:
Start a non-repeating timer in mouseDown: and schedule it with
I am trying to build a pressable button: an on-off button (subclass of
NSButton), which, if pressed for more than 0.3 seconds, displays a
context menu.
My idea was:
Start a non-repeating timer in mouseDown: and schedule it with
NSEventTrackingRunLoopMode.
In mouseUp: invalidate the timer