Re: Problems with mouse events
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