• 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: brian hook <email@hidden>
  • Date: Wed, 05 Sep 2001 21:19:44 -0700

At 08:54 PM 9/5/01 -0700, Richard Schreyer wrote:
When are you expecting the outlets to be connected?

I'm checking for the connection in my custom view's "drawRect" method. If I set a breakpoint next to:

[m_pController foo];

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. It's declared correctly as:

(I'm at home, so this is from memory):

IBOutlet PSController *m_pController;

in the custom view's header.

My understanding of how to do things is as follows:

- build UI in IB
- create subclass of NSObject for MyController
- add outlets/actions for MyController
- instantiate MyController
- control-click connections between MyController and the various views.
- Create Files
- Safe All
- compile and go

All that went without a hitch, it's just that the controller and the views don't seem to know about each other at run-time.

Brian


  • Follow-Ups:
    • Re: [Newbie] Uninitialized outlets?
      • From: Robert S Goldsmith <email@hidden>
References: 
 >[Newbie] Uninitialized outlets? (From: Brian Hook <email@hidden>)
 >Re: [Newbie] Uninitialized outlets? (From: Richard Schreyer <email@hidden>)

  • Prev by Date: Re: [Newbie] Uninitialized outlets?
  • Next by Date: mail server in mac
  • Previous by thread: Re: [Newbie] Uninitialized outlets?
  • Next by thread: Re: [Newbie] Uninitialized outlets?
  • Index(es):
    • Date
    • Thread