• 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
Re: mouse moved events in NSView?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mouse moved events in NSView?


  • Subject: Re: mouse moved events in NSView?
  • From: "David Piasecki" <email@hidden>
  • Date: Tue, 11 May 2004 18:39:48 -0700

Yes, I realize Objective-C uses YES/NO (though I think it's lame for doing so). So far, true/false has also worked fine for me, but I may have only been using true, so thanks for the heads up on false.

David


On May 11, 2004, at 6:33 PM, Allan Odgaard wrote:

On 12. May 2004, at 3:14, David Piasecki wrote:

I actually just did that a few minutes ago, but thanks. It's still not working, though I think Satoshi is correct regarding setting the first responder for mouse moved events.

Well yes, you need both!

I just don't know how to do that. So far I tried overriding the acceptsFirstResponder method to always return true.

ObjectiveC uses YES/NO, not true/false (although true will do the same). Did you try to overload becomeFirstResponder to see if your view ever becomes the first responder? You need to either click the view (with the mouse) or set the windows initial first responder setting to the view in question -- also, be aware that the window cannot (by default) become key if it has no title bar and resize gadget.

If you can't make it work, post some code.
_______________________________________________
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: mouse moved events in NSView?
      • From: "Louis C. Sacha" <email@hidden>
References: 
 >Re: mouse moved events in NSView? (From: "David Piasecki" <email@hidden>)
 >Re: mouse moved events in NSView? (From: Allan Odgaard <email@hidden>)
 >Re: mouse moved events in NSView? (From: "David Piasecki" <email@hidden>)
 >Re: mouse moved events in NSView? (From: Allan Odgaard <email@hidden>)

  • Prev by Date: NSImageView printing in landscape orientation
  • Next by Date: Re: [Array writeToFile:Path atomically:YES]
  • Previous by thread: Re: mouse moved events in NSView?
  • Next by thread: Re: mouse moved events in NSView?
  • Index(es):
    • Date
    • Thread