objective c - Duplicate NSLog entries -


i don't know if it's possible me include code here that's relevant project large there typical reasons why nslog repeat warnings , calls @ occasions 1 call/error occuring?

as example, have subclass of nsbox inits instance of class on awakefromnib:

- (void) awakefromnib {     burbcontrollerinstance = [[burbcontroller alloc] init];     if (burbcontrollerinstance) {         nslog(@"init ok");     } } 

i nslog printing "init ok" twice. don't see why subclass 'awoken' twice anywhere in project. part of larger problem can't variables return nil class i'm creating instance of. i'm wondering if perhaps double values it.

this post helpful, i. e. 1 comment:

also important: awakefromnib can called multiple times on controller if use same controller several nibs – say, you’re using app delegate owner of both app’s box , preferences dialog. you’ll need guard test if use awakefromnib initializing nib objects

update: more interesting this, author mentions awakefromnib gets called twice. unfortunately there no real answer particular problem maybe basic ideas.

update #2: potential solution stackoverflow.com: view controller calls awakefromnib twice.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -