Skip navigation.
 
mlRe: Circular initialization of controllers in NIB file
FROM : Nathan Auch
DATE : Thu Jan 03 20:00:48 2008

Alastair Houghton wrote:
> On 3 Jan 2008, at 18:16, Nathan Auch wrote:
>

>> Thus, the main window controller has an IBOutlet for a panel
>> controller, and the panel controller has an IBOutlet for the main
>> window controller. These are both assigned in Interface Builder.
>> After loading the NIB file, the IBOutlet pointing to the main window
>> controller from the panel controller is never set (value is nil). I
>> think this must be because there is a circular dependency during
>> initialization of the NIB file.

>
> No, that's not the problem.  Most likely you have chosen a name for
> your variable for which there is an unrelated -setSomeName: method;
> that method will be being called during initialisation, rather than
> just setting the variable directly.


This doesn't appear to be the case, the name of the variable was
"main_controller", I've changed it to "my_main_controller" and
reconnected the outlets in IB but I'm still seeing the same behaviour.
In general, are there any best practices for choosing variable names to
avoid the situation you describe?

What's the best way to go about debugging issues with NIB file loading?
Can I break on something specific in the debugger? In the mean time,
I'll see if I can get a small repro together, and post the code to this
list.
>
> Kind regards,
>
> Alastair.
>
> --
> http://alastairs-place.net
>
>
>
>
>

Related mailsAuthorDate
mlCircular initialization of controllers in NIB file Nathan Auch Jan 3, 19:16
mlRe: Circular initialization of controllers in NIB file Alastair Houghton Jan 3, 19:33
mlRe: Circular initialization of controllers in NIB file Nathan Auch Jan 3, 20:00
mlRe: Circular initialization of controllers in NIB file Jonathan Hess Jan 3, 22:28
mlRe: Circular initialization of controllers in NIB file Nathan Auch Jan 3, 22:39
mlRe: Circular initialization of controllers in NIB file Jim Murry Jan 4, 09:46
mlRe: Circular initialization of controllers in NIB file Alastair Houghton Jan 4, 20:24
mlRe: Circular initialization of controllers in NIB file Jonathan Hess Jan 4, 20:44
mlRe: Circular initialization of controllers in NIB file Nathan Auch Jan 4, 21:57
mlRe: Circular initialization of controllers in NIB file Jonathan Hess Jan 5, 03:12
mlRe: Circular initialization of controllers in NIB file Jim Murry Jan 6, 02:24
mlRe: Circular initialization of controllers in NIB file Nathan Auch Jan 7, 15:59
mlRe: Circular initialization of controllers in NIB file Nathan Auch Jan 7, 21:33