button target action getting called on nib instantiation, why?
button target action getting called on nib instantiation, why?
- Subject: button target action getting called on nib instantiation, why?
- From: tyler <email@hidden>
- Date: Thu, 9 Aug 2001 13:34:43 -0700
Hey all,
Weird behavior in an app I'm working on and I wondered if you might
have a hint about what is going on:
NSPanel with a number of checkboxes and NSButtons. Custom controller
which is the nib file's owner and has outlets for all the items in the
window and actions for the buttons.
When the nib is loaded one of the button's target action method is
called.
Stack trace looks like:
-[mycontroller defaultsAction:] // called controller action
method, why?!
-[NSObject performSelector:withObject:]
-[NSNibOutletConnector establishConnection]
-[NSNibObjectData nibInstantiateWithOwner:topLevelObjects:]
loadNib
+[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:]
+[NSBundle(NSNibLoading) loadNibFile:externalNameTable:withZone:]
etc.
So the question is, what could I have done in IB, or elsewhere that is
making this happen? To work around it I'll have to write some funky
code to tell when the window has actually displayed and when it could
actually be the user who hit the button... lame.
any help appreciated!
peace,
tyler