• 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: Why getting two awakeFromNib messages??
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why getting two awakeFromNib messages??


  • Subject: Re: Why getting two awakeFromNib messages??
  • From: Volker in Lists <email@hidden>
  • Date: Sun, 25 Oct 2009 10:21:06 +0100

Hi,

you load the second nib from the main controller i guess. Thereby you set the instance of your main ontroller as owner, thus it gets the awakeFromNib call. Set your second controller as owner or nil (if you have an instance of your second class in your NIB as file owner (!)).

Cheers,
Volker

Am 25.10.2009 um 09:55 schrieb DairyKnight:

Hi all,

I'm trying to use two nib files in my program. In my main controller class,
I load the second nib with:


[NSBundle loadNibNamed:"second" owner:self];


But then, not only does the second controller in the second nib file recevie
the awakeFromNib message, but also does the main controller
class. Anyone knows why? Or Cocoa just broadcasts this message to every
class?
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Why getting two awakeFromNib messages??
      • From: DairyKnight <email@hidden>
References: 
 >Why getting two awakeFromNib messages?? (From: DairyKnight <email@hidden>)

  • Prev by Date: Why getting two awakeFromNib messages??
  • Next by Date: Re: Why getting two awakeFromNib messages??
  • Previous by thread: Why getting two awakeFromNib messages??
  • Next by thread: Re: Why getting two awakeFromNib messages??
  • Index(es):
    • Date
    • Thread