Hi Brandon, (sorry, I called you Peter before, I see my mistake now!)

I think you're flailing a bit here. I'm assuming that your interface is built 
using interface builder (IB), and not code - that would be sensible. However, 
it's sometimes easy to get confused and end up with objects made in code AND 
objects created in the nib. In your mind you think they're the same object, in 
reality they're not. You test one and it's perfectly valid. The other is nil, 
and that's the one you're actually trying to use.

Something like that could well be going on here, but the only way to get to the 
bottom of it is to show all of your code, and the structure of your nib, which 
isn't actually feasible on this list.

By the few clues you mention, it seems that there's definitely something 
incorrect about the way your nib is loading and connecting to other objects in 
your app. What code runs when the 'Advanced' button is clicked? I would expect 
you to instantiate some sort of window controller object, which loads a nib. 
The controller would have references to your data model as well as all of the 
controls it manages. The controller is an object you make - it should not also 
be an instance in the nib (it becomes "files owner" of the nib, which is not an 
object in the nib, but a placeholder for an object external to the nib).

If you have added your controller as an object in the nib, it might explain 
what you're seeing - you've connected outlets and actions to that object, but 
you're looking at the value of the same outlets of 'files owner', which aren't 
connected. When you load the nib, these outlets are initialised to nil. Or 
maybe vice versa? I dunno - you really need to understand nibs, files owner and 
how to load a window.

Beyond vague generalities and pure speculation, I can't offer anything else 
right now.

--Graham


On 4 Jun 2014, at 7:46 am, Peters, Brandon <bap...@my.fsu.edu> wrote:

> Here is what I found:
> 
> When the App first starts up, everything is initialized.
> 
> When I press the “Advanced” button in my App’s Toolbar, awakeFromNib is 
> called, and the “Start”, “Stop”, “Advanced”, and OGL View are “reset” to nil.
> 
> But my other UI elements like sliders and such remain non-nil.


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to