• 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: [Newbie] Uninitialized outlets?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Phantom views? was RE: [Newbie] Uninitialized outlets?
      • From: Brian Hook <email@hidden>
References: 
 >[Newbie] Uninitialized outlets? (From: Brian Hook <email@hidden>)
 >Re: [Newbie] Uninitialized outlets? (From: brian hook <email@hidden>)

  • Prev by Date: Re: address of method in a class instance
  • Next by Date: Dates
  • Previous by thread: Re: [Newbie] Uninitialized outlets?
  • Next by thread: Re: [Newbie] Uninitialized outlets?
  • Index(es):
    • Date
    • Thread