• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSCell mouse tracking best practices.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSCell mouse tracking best practices.


  • Subject: Re: NSCell mouse tracking best practices.
  • From: mmalc crawford <email@hidden>
  • Date: Wed, 5 Jul 2006 13:40:16 -0700


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

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSCell mouse tracking best practices.
      • From: Óscar Morales Vivó <email@hidden>
References: 
 >Fwd: NSCell mouse tracking best practices. (From: Óscar Morales Vivó <email@hidden>)

  • Prev by Date: Fwd: NSCell mouse tracking best practices.
  • Next by Date: Detect modifier keys on launch
  • Previous by thread: Fwd: NSCell mouse tracking best practices.
  • Next by thread: Re: NSCell mouse tracking best practices.
  • Index(es):
    • Date
    • Thread