Re: [Newbie] Uninitialized outlets?
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