• 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: Init controller called twice
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Init controller called twice


  • Subject: Re: Init controller called twice
  • From: Zac Tolley <email@hidden>
  • Date: Sun, 7 Aug 2005 23:44:43 +0100

I look in the stack the first time the app loads and get something like what you see below, I guess it's because it's the owner of the nib, but doesn't it have to be if it's the controller for this window?

How do I tell it not to load this nib by default, but have the nib loaded by the document?


Zac

0 -[MainWindowController init]
1 -[NSCustomObject nibInstantiate]
2 -[NSIBObjectData instantiateObject:]
3 -[NSIBObjectData nibInstantiateWithOwner:topLevelObjects:]
4 loadnib
5 +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:]
6 +[NSBundle(NSNibLoading) loadNibFile:externalNameTable:withZone:]
7 +[NSBundle(NSNibLoading) loadNibNamed:owner:]
8 NSApplicationMain
9 main








On 7 Aug 2005, at 15:36, Daniel Jalkut wrote:

Have you set a breakpoint on the init routine and looked at the stack crawl at that point?

D

On Aug 7, 2005, at 7:02 AM, Zac Tolley wrote:


I have a weird one that I'm sure is a simple error.

I created a cocoa document app and then modified it to be modal/ view/controller based. I have a MyDocument, I created a window controller, I made that the owner of my window and I have overwritten makewindowcontrollers.

The problem is my window controllers init function gets called twice. It gets called, then after that the MyDocument created it in it makewindowcontrollers call.

What would be creating it the first time?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
sweater.com


This email sent to email@hidden





_______________________________________________ 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: 
 >Init controller called twice (From: Zac Tolley <email@hidden>)

  • Prev by Date: Re: tiffrepresentation of multiple subviews
  • Next by Date: Re: Init controller called twice
  • Previous by thread: Init controller called twice
  • Next by thread: Re: Init controller called twice
  • Index(es):
    • Date
    • Thread