• 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
acceptsFirstMouse doesn't work
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

acceptsFirstMouse doesn't work


  • Subject: acceptsFirstMouse doesn't work
  • From: Leonardo <email@hidden>
  • Date: Wed, 22 Jun 2011 19:47:39 +0200
  • Thread-topic: acceptsFirstMouse doesn't work

Hi,
I have a xib file with a MyButton nested that way

MyWindow
    MyContentView
        MySplitView
            MyRightView
                MyScrollerView
                    MyDocumentView
                        MyButton

I have properly subclassed all of these classes and overrided
    - (BOOL)acceptsFirstMouse:(NSEvent *)theEvent { return YES; }
but I can't get the first click activate the button's action. The first
clicks activate justthe window, then I have to click on the button again to
call it's action.

When MyButton is nested
MyWindow
    MyContentView
        MyButton
it works very well, so I suppose that the problem comes from
MyDocumentView's clipView. Right? If so, should I override the
acceptsFirstMouse in the MyDocumentView's clipView too? If yes, how to
subclass the clipView and replace the one already present within
MyScrollerView?

Also, I can't select a tableView's row with the firstClick too.


Regards
-- Leonardo


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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

  • Prev by Date: Re: Synthesised properties and additional actions
  • Next by Date: Re: Synthesised properties and additional actions
  • Previous by thread: Re: How to log arguments in runtime?
  • Next by thread: Proper removal of a NSStatusItem?
  • Index(es):
    • Date
    • Thread