• 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: Problems with mouse events
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems with mouse events


  • Subject: Re: Problems with mouse events
  • From: Ryan Stevens <email@hidden>
  • Date: Sun, 21 Nov 2004 11:14:07 -0800

On Nov 20, 2004, at 7:23 PM, Sam Wilkins wrote:

I was hoping one of you could answer a few questions I have.

[snip]

Some guy who didn't want to respond to the list because he didn't want spammers getting his email found this code for me. Unfortunately, the NSScrollView in which this view resides has stopped receiving scrollWheel events. I cannot figure out where to insert myself into the responder chain so that selected text fields get key events, my scroll view gets scrollWheel events (the only thing I can think of to do causes an instant crash whenever keyDown is generated (with over 10,000 recursive calls to -[NSViewRectCache cacheRect:] on the stack!), which also includes holding shift to modify scroll wheel behaviour) and my view gets every other mouse related event.



There was a discussion on CocoaDev dealing with scrollWheel events that may help and should be pretty easy to find.


My next problem is that often the mouse is already inside the rect when the window is first displayed. Do you have any suggestions for forcing a mouseEntered event to be generated if that's the case?


Could just do it yourself (in applicationDidFinishLaunching perhaps)...

if (NSPointInRect(mouseLoc, theRect)) {/* create and send off a mouseEntered event */ }

_______________________________________________
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: Problems with mouse events
      • From: Sam Wilkins <email@hidden>
References: 
 >Problems with mouse events (From: Sam Wilkins <email@hidden>)

  • Prev by Date: Re: Keyed archiver
  • Next by Date: Cocoa applications and exit codes
  • Previous by thread: Problems with mouse events
  • Next by thread: Re: Problems with mouse events
  • Index(es):
    • Date
    • Thread