• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Open a window created in another nib
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Open a window created in another nib


  • Subject: Open a window created in another nib
  • From: Andrea Salomoni <email@hidden>
  • Date: Wed, 28 Dec 2005 10:13:05 +0100

Hi to all,

I created a secondary nib file that contains a NSWindow.
I created the nib using IB and choosing new application.
After it I made a new class and instatiated it in IB, connected an outlet to the window.
I have another nib file (the main) with a button connected, I would like to open the secondary nib file window clicking on it.

I added in the controller.h this:

MYWindowController * theSecondWin;

in the .m file:

-(id)init
....
theSecondWin = [[MYWindowController]alloc]init];
....
}

and an action

-(IBAction)openWin:(id)sender
{
[theSecondWind openW];
}

In the MYWindowController.m the method:

-(void)openWin
{
[theWindow makeKeyAndOrderFront:self];
}

But the window still close....
Where am I wrong?

Thank you all
Andrea

_______________________________________________
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
  • Follow-Ups:
    • Re: Open a window created in another nib
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: Re: AppleScript bug in cocoa
  • Next by Date: Re: Open a window created in another nib
  • Previous by thread: Re: AppleScript bug in cocoa
  • Next by thread: Re: Open a window created in another nib
  • Index(es):
    • Date
    • Thread