• 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
[TRTFM] mouseMove invoked on non-FrstResponder?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[TRTFM] mouseMove invoked on non-FrstResponder?


  • Subject: [TRTFM] mouseMove invoked on non-FrstResponder?
  • From: Allan Odgaard <email@hidden>
  • Date: Wed, 14 Aug 2002 02:17:36 +0200

Hi there,

I'm going crazy with the event stuff in Cocoa.

I have a view in which I want to receive mouse move events, even though this view isn't the first responder (an NSTextField often is) -- I read somewhere that mouse events were distributed to all objects, but perhaps that only apply to mouse up/down, cause I don't get my move-events.

So I set my view as the window's next responder (and set my views next responder to nil to prevent an infinite loop) -- note that this view subclass needs to be used in several applications, so I cannot just overload the window's sendEvent or similar (to fix what is IMHO a really broken event distribution scheme :-( ).

This seem to work except that occasionally my view stops getting move events. I should add that my view is embedded in an NSScrollView -- when this happens, I can just scroll around a little (with my mouse wheel) and/or click left button on the view, and then mouse move events start to work again. This lack of events only seem to appear after my view changes its frame -- dumping the responder chain when it happens doesn't reveal anything out of the ordinary, and while mouse move events are missing, key events seems to work fine.

Has anyone experienced similar? could it be that I do something wrong?

Secondly I also really would like my view to receive key events that make no real sense in the active NSTextField (like arrow up/down) -- but I assume that this is impossible without overloading stuff in other classes than the view itself?!?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
  • Follow-Ups:
    • Re: [TRTFM] mouseMove invoked on non-FrstResponder?
      • From: "John C. Randolph" <email@hidden>
  • Prev by Date: Re: Stupid newbie question - determine if integer is even or odd
  • Next by Date: Re: Stupid newbie question - determine if integer is even or odd
  • Previous by thread: Re: Stupid_newbie_question_determine_if_integer is even or odd
  • Next by thread: Re: [TRTFM] mouseMove invoked on non-FrstResponder?
  • Index(es):
    • Date
    • Thread