Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Newbie] Uninitialized outlets?



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


References: 
 >[Newbie] Uninitialized outlets? (From: Brian Hook <email@hidden>)
 >Re: [Newbie] Uninitialized outlets? (From: Richard Schreyer <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.