Re: NULL Outlets in one file work in another
Re: NULL Outlets in one file work in another
- Subject: Re: NULL Outlets in one file work in another
- From: Greg Guerin <email@hidden>
- Date: Tue, 26 May 2009 09:24:26 -0700
Walker Argendeli wrote:
So in App_Delegate's applicationDidFInishLaunching method, I have
something that looks like this:
[self doStuff];
FirstLaunch *thing = [[FirstLaunch alloc] init];
[thing doStuff];
And either the first line is commented out or the last two are
commented out. The method they are calling is the same, just
located in different files. Both App_Delegate and FirstLaunch have
the Outlet ivars connected in IB and give no warnings or errors.
Use the debugger.
Set a breakpoint on doStuff, then look at the state of the outlets.
Where do the problematic outlets exist: in App_Delegate or in
FirstLaunch?
If they are in App_Delegate, is IB connecting to those, or is it
connecting to ones in App_Delegate? How does FirstLaunch get a
reference to App_Delegate, in order to access its outlets?
Is IB creating an instance of FirstLaunch and setting its outlets?
If so, then your use of [[FirstLaunch alloc] init] is wrong, because
it creates a new empty FirstLaunch that has never had its outlets
filled in.
-- GG
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden