• 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: NULL Outlets in one file work in another
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: Displaying a number with Quartz
  • Next by Date: Re: Displaying a number with Quartz
  • Previous by thread: Re: NULL Outlets in one file work in another
  • Next by thread: Re: NULL Outlets in one file work in another
  • Index(es):
    • Date
    • Thread