• 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: How to track a lost mouseDown
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to track a lost mouseDown


  • Subject: Re: How to track a lost mouseDown
  • From: Uli Kusterer <email@hidden>
  • Date: Mon, 27 Aug 2007 20:23:39 +0200

On 27.08.2007, at 19:53, Steve Cronin wrote:
My customView's - resetCursorRects gets called and the cursor changes correctly when mouse moves thru the rect.

So, I guess the view is where you think it should be, good.

However when I then mouseDown (inside the changed cursorRect!) - nothing

Have you tried setting a breakpoint in your mouseDown method and running it in the debugger to see whether it's called, or added an NSLog() call at the start? Maybe it *is* called but your code just doesn't do what you think it should? If it isn't called, have you checked your mouseDown method's name, parameters and return value for correctness? I.e. are they exactly the same as in the declaration in NSResponder or NSView or wherever they're first declared?


Can you post your mouseDown method? Can you post the header for your class? (In particular, what have you chosen as the base class, and what other methods are you overriding?)

 Is your view frontmost?

It's always a good idea to run your code in the debugger and add NSLog() calls to see where it is failing exactly, (if the debugger doesn't trigger, always try an NSLog() or NSBeep() -- Sometimes the debugger just got confused or you're accidentally running a release build). And when posting here, posting code is always helpful.

To find out where an event is going, you could override sendEvent: in NSApplication and NSWindow (using method swizzling), and add a mouseDown method to NSResponder, to detect some places where an event may go, but I'm not sure there's a way to get informed of events that get dispatched to other views.

Cheers,
-- M. Uli Kusterer
http://www.zathras.de



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: How to track a lost mouseDown
      • From: Steve Cronin <email@hidden>
References: 
 >How to track a lost mouseDown (From: Steve Cronin <email@hidden>)

  • Prev by Date: Re: Newbie question about _NSSize and NSSize
  • Next by Date: Re: CGContextSetStyle console log error?
  • Previous by thread: Re: How to track a lost mouseDown
  • Next by thread: Re: How to track a lost mouseDown
  • Index(es):
    • Date
    • Thread