NSDocument beginSheet on a new document
NSDocument beginSheet on a new document
- Subject: NSDocument beginSheet on a new document
- From: Tod Cunningham <email@hidden>
- Date: Mon, 22 Nov 2004 00:50:00 -0500
I would like to have a sheet auto open when a new document is created
in an NSDocument project. Where is the best place to put the call to
beginSheet? I have tried several places and none seem to work. Most
interestingly the following doesn't work:
- (void)windowControllerDidLoadNib:(NSWindowController *)
windowController
{
...
if( some_condition_that_requires_sheet_to_be_auto_opened )
{
[NSApp beginSheet:cabrilloHeaderPanel
modalForWindow:[windowController window]
modalDelegate:self
didEndSelector:@selector(editCabrilloHeadersDidEnd:returnCode:
contextInfo:)
contextInfo:nil];
}
}
What happens is that the sheet gets opened, but not attached to the
window (looks very odd as the sheet will have to title bar). The sheet
opens before the window is visible and ends up detached. Any ideas on
how to approach this?
- Tod
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden