Re: [semi-newbie] Message sent to NSWindowController after complete window load
Re: [semi-newbie] Message sent to NSWindowController after complete window load
- Subject: Re: [semi-newbie] Message sent to NSWindowController after complete window load
- From: Bill Cheeseman <email@hidden>
- Date: Thu, 03 Oct 2002 10:22:25 -0400
on 02-10-02 9:08 PM, mw at email@hidden wrote:
>
I have a question about that delegate method though (before I try it
>
myself). Will it be called every time any portion of the window is exposed
>
(ie. If another window is moved on top of it and then moved off)? If so,
>
that won't work. I just need notification after the window has been loaded
>
and is visible. As for the other two methods, they will be called anytime
>
the window is activated after being deactivated; again that won't work.
Right you are. But will the condition that caused the sheet to present be
cured when it is dismissed? If so, you don't care if either of the last two
gets called again because the sheet won't display again. If dismissing the
sheet doesn't cure the condition, you could maintain a variable to tell you
whether the sheet has been displayed already.
As to the first method, I don't know if it's called every time a part of the
window is exposed. The class reference document on it is singularly vague on
the point. It's easy enough to test, though.
Don't overlook NSWindow's isVisible method, to test whether the window is
onscreen (even if obscured).
I wonder if you can safely call NSWindow's showWindow: or
makeKeyAndOrderFront: from awakeFromNib. If so, you could do that, then
present your sheet in awakeFromNib immdiately after showWindow:. Ditto for
NSDocument's windowControllerDidLoadNib:.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
The AppleScript Sourcebook -
http://www.AppleScriptSourcebook.com
Vermont Recipes -
http://www.stepwise.com/Articles/VermontRecipes
Croquet Club of Vermont -
http://members.valley.net/croquetvermont
_______________________________________________
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.