• 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
Re: Show a window from another nib
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Show a window from another nib


  • Subject: Re: Show a window from another nib
  • From: Scott Ribe <email@hidden>
  • Date: Fri, 03 Nov 2006 10:08:50 -0700
  • Thread-topic: Show a window from another nib

Roughly speaking (many variations possible, depending on how you organize
your project):


@interface MyWindowController : NSWindowController
{
}

+ ( MyWindowController *) createAndShowWindow;

@end


@implementation MyWindowController

+ ( MyWindowController *) createAndShowWindow
{
    MyWindowController  * wdw = [[ MyWindowController alloc] _init];
    [[wdw window] makeKeyAndOrderFront: self];
    return wdw;
}

- (id) _init
{
    self = [super initWithWindowNibName: @"MyWindowNib" owner: self];
    return self;
}


--
Scott Ribe
email@hidden
http://www.killerbytes.com/
(303) 722-0567 voice


 _______________________________________________
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: Show a window from another nib
      • From: Scott Ribe <email@hidden>
References: 
 >Show a window from another nib (From: Marcus Karlsson <email@hidden>)

  • Prev by Date: Re: Show a window from another nib
  • Next by Date: Re: [NewB] printing
  • Previous by thread: Re: Show a window from another nib
  • Next by thread: Re: Show a window from another nib
  • Index(es):
    • Date
    • Thread