|
|
Detecting entrance and exits of NSViews
|
|
|
|
Mac Elite
Join Date: Jan 2001
Location: New York
Status:
Offline
|
|
How do I detect when the mouse enters or exits a NSView?
|
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Dec 2000
Location: Chicago, Illinois
Status:
Offline
|
|
Originally posted by davecom:
<STRONG>How do I detect when the mouse enters or exits a NSView?</STRONG>
NSResponder has to methods called mouseEntered and mouseExited. Because NSView is a subclass of NSResponder, all you should have to do is override mouseEntered and mouseExited.
HTH,
F-bacher
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Jan 2001
Location: New York
Status:
Offline
|
|
Originally posted by Ghoser777:
<STRONG>
NSResponder has to methods called mouseEntered and mouseExited. Because NSView is a subclass of NSResponder, all you should have to do is override mouseEntered and mouseExited.
HTH,
F-bacher</STRONG>
Thanks, I should've looked up the chain.
|
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: Jan 2001
Location: Virginia, US
Status:
Offline
|
|
Also read the /Developer/Documentation/Cocoa/TasksAndConcepts/ProgrammingTopics/BasicEventHandling/Tasks/HandlingMouseTracking.html doc file. I think you'll need to set up a tracking rect to get those messages sent to you.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|