Re: Prevent click through (Tiger and Leopard)
Re: Prevent click through (Tiger and Leopard)
- Subject: Re: Prevent click through (Tiger and Leopard)
- From: Jens Alfke <email@hidden>
- Date: Tue, 11 Mar 2008 22:10:39 -0700
On 11 Mar '08, at 9:36 PM, Marc Respass wrote:
I am confused about how to prevent click through.
I don't _think_ this is related to "click-through", as in buttons in
inactive windows still responding to clicks. Click-through doesn't
happen for buttons explicitly marked as disabled.
My document puts up a window when a button is clicked. I disable the
button then display the other window. If the user clicks off the
other window (it resigns key), then I close it and re-enable the
button.
That's kind of a nonstandard UI. I would not expect a window to
disappear just because I clicked in another window of the same app. I
could see a user getting really frustrated by this behavior; are you
sure it's what you want?
But the main window becomes active and my button is enabled too
soon. The button is disabled but if I click on it when it's
disabled, it becomes enabled in time to receive the click.
It sounds like the order of events is
- Click in main window causes it to activate
- Your code responds to the activation by closing the extra window and
enabling the button
- Main window dispatches the click to the button, which handles it
because it's now enabled.
If you really don't want this to happen, you could slightly delay the
re-enabling of the button via a perform-after-delay, i.e. [self
performSelector: @selector(reEnableTheButton) withObject: nil
afterDelay: 0.0].
—Jens
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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