Re: [newbie]How to pop a window?
Re: [newbie]How to pop a window?
- Subject: Re: [newbie]How to pop a window?
- From: Shawn Erickson <email@hidden>
- Date: Sat, 08 Jul 2006 09:27:08 -0700
On Jul 8, 2006, at 7:44 AM, Bus Mini wrote:
I did connect *IBOutlet NSWindow *myWindow *to the window which was
created
in nib.
and the followed code is the exactly method was called when a
button was
cilcked
- (IBAction)startToWork:(id)sender
{
[myWindow makeKeyAndOrderFront:self];
}
It doesn't work.
Ok..
Are you 100% sure your myWindow outlet is correctly connected in the
nib?
Do you have any methods called myWindow or setMyWindow: in your class?
Are you sure startToWork: is getting called?
When is startToWork: getting called?
Try adding the following to your class and see if your window pops up...
- (void) awakeFromNib {
[ myWindow makeKeyAndOrderFron:self];
}
... if it does pop up then make sure to review ...
<http://developer.apple.com/documentation/Cocoa/Reference/
ApplicationKit/Protocols/NSNibAwaking_Protocol/Reference/Reference.html>
<http://developer.apple.com/documentation/Cocoa/Conceptual/
LoadingResources/index.html>
-Shawn
_______________________________________________
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