Re: [Newbie] Uninitialized outlets?
Re: [Newbie] Uninitialized outlets?
- Subject: Re: [Newbie] Uninitialized outlets?
- From: Robert S Goldsmith <email@hidden>
- Date: Thu, 06 Sep 2001 11:14:50 +0100
Hi :)
According to the inspector "m_pController" is "0x0". Nowhere is it
explicitly initialized, but that's because I had assumed that all the
connections were made behind the scenes.
I have noticed that with menus, outlets are not connected
until your class instance has responded to awakeFromNib -
even if you do nothing in awakeFromNib. It simply seems the
method has to be there.
I am pretty much as new to the gui stuff as you are but that
was just an observation. I have no idea why, but my file -
open menu item was greyed out until i had a method like:
-(void)awakeFromNib
{
NSLog(@"Test this is called\n");
}
Notice that CurrencyConverter has an awakeFromNib that sets the window
to the front and gives it keyboard response as well as setting which
text field responds to the keyboard.
If you have a main window (which I didn't at the time i
encountered the strange behaviour above) just put something
similar in your method.
Robert