Skip navigation.
 
mlRe: [newbie]How to pop a window?
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

Related mailsAuthorDate
ml[newbie]How to pop a window? Bus Mini Jul 7, 19:25
mlRe: [newbie]How to pop a window? Uli Kusterer Jul 7, 20:33
mlRe: [newbie]How to pop a window? Bus Mini Jul 8, 06:26
mlRe: [newbie]How to pop a window? Uli Kusterer Jul 8, 12:41
mlRe: [newbie]How to pop a window? Bus Mini Jul 8, 16:44
mlRe: [newbie]How to pop a window? I. Savant Jul 8, 17:33
mlRe: How to pop a window? Bus Mini Jul 8, 17:53
mlRe: [newbie]How to pop a window? Shawn Erickson Jul 8, 18:27
mlRe: [newbie]How to pop a window? Uli Kusterer Jul 8, 21:25
mlRe: How to pop a window? Bus Mini Jul 9, 16:33