• 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
Event handling question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Event handling question


  • Subject: Event handling question
  • From: "Christian Moen" <email@hidden>
  • Date: Sun, 4 Feb 2007 21:08:19 +0900

cocoadev,

I'm working on an application with a custom view and I have a question
on event handling.

My custom view area contains several tracking rects which capture
mouse movement in the view.  As the user moves his mouse, I'd like to
highlight the active part of the view indicated by the tracking rect
being entered.  This works fine when the user moves the mouse and
activates a new tracking rect.

My question is: How should I handle a window with my custom view being
opened under the mouse pointer?  My custom view doesn't seem get an
initial mouseEntered: call.

Should I send a mouseEntered event myself in the custom view's
awakeFromNib method by getting the mouse position using NSWindow's
mouseLocationOutsiteOfEventStream and converting this the view
coordinates?

Thanks for any advice.


Christian _______________________________________________

Cocoa-dev mailing list (email@hidden)

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: Event handling question
      • From: Ricky Sharp <email@hidden>
  • Prev by Date: Re: mouseMoved in NSTextView
  • Next by Date: Re: Event handling question
  • Previous by thread: Re: Strange Crash
  • Next by thread: Re: Event handling question
  • Index(es):
    • Date
    • Thread