Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Detecting entrance and exits of NSViews

Detecting entrance and exits of NSViews
Thread Tools
davecom
Mac Elite
Join Date: Jan 2001
Location: New York
Status: Offline
Reply With Quote
Feb 2, 2002, 03:58 PM
 
How do I detect when the mouse enters or exits a NSView?
     
Ghoser777
Professional Poster
Join Date: Dec 2000
Location: Chicago, Illinois
Status: Offline
Reply With Quote
Feb 2, 2002, 05:18 PM
 
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
     
davecom  (op)
Mac Elite
Join Date: Jan 2001
Location: New York
Status: Offline
Reply With Quote
Feb 3, 2002, 01:55 AM
 
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.
     
lindberg
Dedicated MacNNer
Join Date: Jan 2001
Location: Virginia, US
Status: Offline
Reply With Quote
Feb 3, 2002, 10:04 AM
 
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 Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 03:15 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,