Re: forcing a dialog to be the active (front) window
Re: forcing a dialog to be the active (front) window
- Subject: Re: forcing a dialog to be the active (front) window
- From: Glenn Andreas <email@hidden>
- Date: Fri, 23 Jul 2004 10:11:04 -0500
At 9:45 AM -0500 7/23/04, John Spicer wrote:
Still not having any luck with this. I was wondering if it's because I
started with a doc application template.
Could this possibly have any effect?
I have tried what's shown below with no difference. Also tried this:
[medicalAlertPanel orderFrontRegardless];
But it makes no difference.
Basically, the window does **not** become the active window till it's
clicked upon, after the nib file is loaded (it's in a separate nib
file, I'm using what I think is standard code to load it):
- (IBAction) showAlertPanel:(id)sender
{
if (AlertPanel == nil)
{
if (![NSBundle loadNibNamed:@"Alerts.nib" owner:self])
{
NSLog (@"Load of Alerts.nib failed");
return;
}
}
// [medicalAlertPanel makeKeyAndOrderFront: nil]; <- tried this plus
next line
// [medicalAlertPanel orderFrontRegardless]; <- and even together
with no change
}
I'm clueless on this one. Anyone have some ideas to try, or even yet,
can tell me **exactly** what I'm doing wrong?
Are you sure that "medicalAlertPanel" is what you think it is?
Especially since the if statement uses something called "AlertPanel".
Add an NSLog(@"medicalAlertPanel = %@", medicalAlertPanel); before
you send the "makeKeyAndOrderFront" (since it may be that it is NULL,
and thuse those two lines of code do nothing).
Double check your nib file to make sure that medicalAlertPanel
outlet of your object (which will be the files owner for that nib) is
properly connected to the alert you expect.
Also make sure that you don't have a routine called
"setMedicalAlertPanel:" (that does anything other than setting the
medicalAlertPanel ivar) since that will be called when the nib is
loaded when the nib loading happens and tries to set that outlet.
--
Glenn Andreas email@hidden
mondo blobbo, Cythera, Theldrow, oh my!
Mad, Bad, and Dangerous to Know
_______________________________________________
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.