Re: Strange window controller behaviour with "move focus to next window..."
Re: Strange window controller behaviour with "move focus to next window..."
- Subject: Re: Strange window controller behaviour with "move focus to next window..."
- From: "I. Savant" <email@hidden>
- Date: Sun, 4 Feb 2007 17:58:29 -0500
Ah - apologies. I missed that part. The delegate methods will
likely not give you different results, given your explanation of how
you have things working.
It may be helpful for you to post the relevant code.
--
I.S.
On Feb 4, 2007, at 5:26 PM, Keith Blount wrote:
Thanks for the reply, but that is exactly what I meant
when I said that:
I have the
window controller of the full screen window set up
to
listen for when one of the main document windows
becomes main.
In this case, the full screen window controller is
listening to the NSWindowDidBecomeKeyNotification (I
tried listening for main as well), and checks to see
if the window that became key is a main document
window. If so, it closes full screen. And as I said,
this notification is received and the code is called
to close the full screen window ([self close]). The
only part that doesn't work is the single line of code
in - (void)close that calls [super close]. But this
works if the main window is clicked on - just not if
it is called up using the "move focus to next window"
shortcut key.
It occurs to me that I am not listening to self
becoming main in the main document's window
controller, though, so I will try this too, though I
don't see why that would make a difference.
Thanks again and best regards,
Keith
--- "I. Savant" <email@hidden> wrote:
NSWindow has -didBecomeKey: and -didBecomeMain:
delegate methods ...
--
I.S.
On Feb 4, 2007, at 12:52 PM, Keith Blount wrote:
Hi,
I have an app that has a full screen mode. I have
the
window controller of the full screen window set up
to
listen for when one of the main document windows
becomes main, and if one does so, the full screen
window closes (using NSWindowController's -close
method). All of this has been working smoothly for
months, until a user pointed out to me the other
day
that if you use the "Move focus to next window in
active application" keyboard shortcut (cmd-` by
default in System Preferences), the main document
window receives the focus without closing the full
screen.
The really strange thing is that my full screen
window
controller's -close override method does get
called at
this point. And even stranger, all of the code
that
comes before and after the call to [super close]
also
gets called and works properly. The only thing
that is
not working is the actual closing of the window -
and
like I say, only in this one particular case.
Is there something special about the "Move focus
to
next window in active application" that I have
missed?
I can see no special reference to it in the docs,
so
would assume that it just goes through the window
list
and makes the next one key or main, but if this is
the
case, I cannot understand why my code is working
so
wonkily, when in every other situation that
another
window becomes key or main, my full screen window
closes successfully.
Thanks in advance for any help,
All the best,
Keith
______________________________________________________________________
______________
Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail
arrives.
http://tools.search.yahoo.com/toolbar/features/mail/
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
40gmail.com
This email sent to email@hidden
______________________________________________________________________
______________
Finding fabulous fares is fun.
Let Yahoo! FareChase search your favorite travel sites to find
flight and hotel bargains.
http://farechase.yahoo.com/promo-generic-14795097
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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