• 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
awakeFromNib called twice !
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

awakeFromNib called twice !


  • Subject: awakeFromNib called twice !
  • From: kubernan <email@hidden>
  • Date: Sun, 2 Dec 2001 09:48:19 +0100

Hello,

I decided to rewrite my multi windows app from scratch and i have a very strange pb :
i discovered my awakeFromNib is called twice !

Here a sample of my code :

---------------
Controller.m

- (IBAction)createFunction:(id)sender
{
id ctrl = [myCreateController new];
if (![NSBundle loadNibNamed:@"Create" owner:ctrl]) {
NSLog(@"Can't launch : Create.nib");
[self release];
}
}

---- myCreateController.m ---------
- (void)awakeFromNib
{
int windowId;
windowId = [myParentWindow windowNumber];
NSLog(@"window number = %d ", windowId);
}

During the execution i have this log when i open only one window:

window number = 380
window number = 0 <---- Big pb.

I have another pb, maybe there is a link ; when i open the two same windows and a program function is called
for resizing the first window, the rezise is applied for the second window !

Have an idea ?
Thx for your help.
Kub.


  • Follow-Ups:
    • Re: awakeFromNib called twice !
      • From: Vince DeMarco <email@hidden>
  • Prev by Date: representing TABs in NSString.
  • Next by Date: Re: Newbie
  • Previous by thread: Re: representing TABs in NSString.
  • Next by thread: Re: awakeFromNib called twice !
  • Index(es):
    • Date
    • Thread