• 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: How to load a special nib file in cocoa?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to load a special nib file in cocoa?


  • Subject: Re: How to load a special nib file in cocoa?
  • From: 魏立群(Gordon.Wei) <email@hidden>
  • Date: Fri, 17 Feb 2006 15:08:10 +0800

Thanks.
I have seen that a nib file include some classed,menu,window etc,
and I added this line into function awakeFromNib, I found that when starts the application it shows two windows, but only shows the menu
included in default nib file.

Thanks & best regards.
  ----- 原始邮件 -----
  发件人: j o a r
  收件人: 魏立群(Gordon.Wei)
  抄送: email@hidden
  发送时间: 2006年2月17日 15:00
  主题: Re: How to load a special nib file in cocoa?



  On 17 feb 2006, at 07.26, Omar Qazi wrote:

  > Then just add it to the awakeFromNib method
  >
  > i.e.
  >
  > - (void)awakeFromNib
  > {
  > //...Do Anything you need to do before loading the nib here
  >
  > [NSBundle loadNibNamed:@"Your Nib" owner:NSApp];
  > }

  Hm... This seems a bit dangerous to me - couldn't you end up with an
  infinite loop? To have "NSApp" as the owner would also not always be
  appropriate.

  Also, it doesn't solve the problem with dynamically loading the
  second nib on demand, and not always.

  On 17 feb 2006, at 07.07, 榄�绔�缇?Gordon.Wei) wrote:

  >     But, where should I add this line?

  The answer to that question is of course really simple. You would add
  that line to the place in your code where you've found out that you
  need to load the second nib file.

  j o a r


 _______________________________________________
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

References: 
 >How to load a special nib file in cocoa? (From: 魏立群(Gordon.Wei) <email@hidden>)
 >Re: How to load a special nib file in cocoa? (From: Omar Qazi <email@hidden>)
 >Re: How to load a special nib file in cocoa? (From: 魏立群(Gordon.Wei) <email@hidden>)
 >Re: How to load a special nib file in cocoa? (From: Omar Qazi <email@hidden>)
 >Re: How to load a special nib file in cocoa? (From: j o a r <email@hidden>)

  • Prev by Date: Re: How to load a special nib file in cocoa?
  • Next by Date: Bindings - duplicate entries in NSPopupButton
  • Previous by thread: Re: How to load a special nib file in cocoa?
  • Next by thread: Re: How to load a special nib file in cocoa?
  • Index(es):
    • Date
    • Thread