FROM : Shawn Erickson
DATE : Sat Jul 08 18:27:08 2006
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
DATE : Sat Jul 08 18:27:08 2006
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
| Related mails | Author | Date |
|---|---|---|
| Bus Mini | Jul 7, 19:25 | |
| Uli Kusterer | Jul 7, 20:33 | |
| Bus Mini | Jul 8, 06:26 | |
| Uli Kusterer | Jul 8, 12:41 | |
| Bus Mini | Jul 8, 16:44 | |
| I. Savant | Jul 8, 17:33 | |
| Bus Mini | Jul 8, 17:53 | |
| Shawn Erickson | Jul 8, 18:27 | |
| Uli Kusterer | Jul 8, 21:25 | |
| Bus Mini | Jul 9, 16:33 |






Cocoa mail archive

