[semi-newbie] Message sent to NSWindowController after complete window load
[semi-newbie] Message sent to NSWindowController after complete window load
- Subject: [semi-newbie] Message sent to NSWindowController after complete window load
- From: mw <email@hidden>
- Date: Wed, 02 Oct 2002 16:37:30 -0400
Well, I finally figured everything out in regards to this new application
structure (previous discussion on this list). Now I have revisited the
original program, executing code as soon as the window is open and visible.
In some cases, a sheet needs to be displayed (if there are overdue bills)
after the check (which takes place in the -windowDidLoad method in the
NSWindowController subclass). But for some reason, -windowDidLoad is called
BEFORE the window is really loaded. Whenever the program attempts to drop
the sheet from the main window, this error occurs (during runtime):
2002-09-29 17:07:33.790 Bill Manager[998] *** Assertion failure in
-[NSApplication
_commonBeginModalSessionForWindow:relativeToWindow:modalDelegate:didEndSelec
tor:contextInfo:], AppKit.subproj/NSApplication.m:2524
2002-09-29 17:07:33.860 Bill Manager[998] Modal session requires modal
window
It would seem that the sheet cannot be dropped because the window isn't in
"modal session" yet. In the debugger, the window isn't even visible when the
line of code that produces this error is executed.
So, does anybody have any suggestions? Is there another method out there
that is called after the window is REALLY loaded and ready to receive
messages (or at least after its "modal session" has been started)?
For those of you who didn't see this post on a previous list, I have both an
NSDocument subclass and an NSWindowController subclass controlling this
window.
Thanks,
mw
_______________________________________________
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.