objective c - AppDelegate logging as NSButton -
i'm trying access instance variables i've declared in appdelegate, class seams think appdelegate nsbutton.
i borrowed code referencing appdelegate instance variables
appdelegate *appdelegate = (appdelegate *)[[nsapplication sharedapplication] delegate]; nslog(@"appdelegate %@", appdelegate );
nslog returns: appdelegate nsbutton: 0x6000001553a0
because appdelegate seems nsbutton, doesn't take trying ask variables, gives me "unrecognized selector sent instance."
i'm missing important, why doesn't appdelegate point appdelegate class?
it sounds hooked “file’s owner”’s delegate outlet in mainmenu.xib button accidentally. instantiate appdelegate in xib , point ‘delegate’ outlet that, instead.
Comments
Post a Comment