displaying a sheet with new document
displaying a sheet with new document
- Subject: displaying a sheet with new document
- From: The Baur Family <email@hidden>
- Date: Sat, 26 Jun 2004 14:57:00 -0700
I'm trying to display a sheet (to connect to a database) in a document
based application. I'm using code that looks like this:
[NSApp beginSheet:connectionPanel
modalForWindow:consoleWindow
modalDelegate:nil
didEndSelector:nil
contextInfo:nil
];
My problem lies in where to put it... If I put it in awakeFromNib or
windowControllerDidLoadNibaController then I end up getting an error:
2004-06-26 14:50:05.938 SnortMAC[1768] *** Assertion failure in
-[NSApplication
_commonBeginModalSessionForWindow:relativeToWindow:modalDelegate:didEndSelector:contextInfo:],
AppKit.subproj/NSApplication.m:2763
2004-06-26 14:50:05.963 SnortMAC[1768] Modal session requires modal window
The funny part is that it works... I just get the errors on the
console. If I put a button in the document window that runs the same
code, then it works w/out error, so I know that things are connected
right and built right in IB... where should I put the code for this so
it happens automatically?
Thanks,
Eric
_______________________________________________
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.