Re: Semi-permeable events
Re: Semi-permeable events
- Subject: Re: Semi-permeable events
- From: Fritz Anderson <email@hidden>
- Date: Sun, 15 Jul 2012 18:13:47 -0500
On 15 Jul 2012, at 5:43 PM, Charlie Dickman wrote:
> I have an app that processes menu interactions just fine but never gets keyboard events or mouse clicks in the close button?
It seems you missed the period key?
How exactly did you determine it as not getting the events, as opposed to not responding to them? Put breakpoints at the earliest chokepoints (like -[NSWindow close]) that would respond to those events.
> What can cause this and what can I do about it?
You'd have to go to some trouble to make that happen. I'll muse on the close button problem, because that's the less-complicated, and may point you to a solution for the other.
The first thing you should try is to create a new Mac application (no need for Core Data or documents) project. The template will give you an application that has a window that responds to its close button. Try to see what the differences are between that and your app.
Do you implement -windowShouldClose:? Does it get hit? Do you return YES?
Did you deactivate the close control on the window in IB? In code? Did you set the window's style mask without the NSClosableWindowMask bit set?
Have you subclassed NSWindow? Why on earth? It's rarely necessary. Failing to call through to super in one of your overrides is a good candidate for what you're seeing.
Are you intercepting application or window event handling? If so, are you calling through to super?
— F
--
Fritz Anderson
Xcode 4 Unleashed: Why don't you have a copy? You're killing me here.
<http://x4u.manoverboard.org/>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden