FROM : mmalc crawford
DATE : Wed Jul 05 22:40:16 2006
On Jul 5, 2006, at 1:17 PM, Óscar Morales Vivó wrote:
> - Keep around an instance variable for the tracking rectangle. Fill
> it up in trackMouse:inRect:ofView:untilMouseUp: right before calling
> super, and then override startTrackingAt:inView:,
> continueTracking:at:inView and stopTracking:at:inView:mouseIsUp:
> (NSSliderCell seems to do this).
> - Just override the whole trackMouse:inRect:ofView:untilMouseUp:
> taking care of the event loop there and ignoring the other three
> mouse tracking methods (That's what the clock control sample code
> does).
>
Personally I would avoid the latter since it makes it more difficult
to alter behaviour in a subclass -- depending on what you do, it may
also interfere with support for bindings.
I've put an updated, bindings-enabled, version of ClockControl at:
<http://homepage.mac.com/mmalc/CocoaExamples/ClockControl2a.zip>
Note that it (still) represents a work in progress. Bug reports are
welcome.
mmalc
DATE : Wed Jul 05 22:40:16 2006
On Jul 5, 2006, at 1:17 PM, Óscar Morales Vivó wrote:
> - Keep around an instance variable for the tracking rectangle. Fill
> it up in trackMouse:inRect:ofView:untilMouseUp: right before calling
> super, and then override startTrackingAt:inView:,
> continueTracking:at:inView and stopTracking:at:inView:mouseIsUp:
> (NSSliderCell seems to do this).
> - Just override the whole trackMouse:inRect:ofView:untilMouseUp:
> taking care of the event loop there and ignoring the other three
> mouse tracking methods (That's what the clock control sample code
> does).
>
Personally I would avoid the latter since it makes it more difficult
to alter behaviour in a subclass -- depending on what you do, it may
also interfere with support for bindings.
I've put an updated, bindings-enabled, version of ClockControl at:
<http://homepage.mac.com/mmalc/CocoaExamples/ClockControl2a.zip>
Note that it (still) represents a work in progress. Bug reports are
welcome.
mmalc
| Related mails | Author | Date |
|---|---|---|
| Óscar Morales Vivó | Jul 5, 22:17 | |
| mmalc crawford | Jul 5, 22:40 | |
| Óscar Morales Vivó | Jul 6, 00:41 |






Cocoa mail archive

