Re: Nib owner's outlets
Re: Nib owner's outlets
- Subject: Re: Nib owner's outlets
- From: David Rehring <email@hidden>
- Date: Thu, 24 Jan 2002 18:20:57 -0800
On 1/24/02 4:25 PM, Rainer Brockerhoff at email@hidden wrote:
>
>
>
> It seems that the Window outlet from the superclass gets connected
>
> correctly when loading the nib since the window shows up. But my others
>
> custom outlets do not. My custom actions are connected fine. I'm
>
> thinking of accessing my window elements by tag as a workaround... but I
>
> can't still figure out why it is not working.
>
>
Try this:
>
initWithWindowNibName:@"Preferences"];
>
[prefs window]; // inserted
>
[prefs showWindow:nil];
>
>
>
I used to have the same problem under those circumstances, and inserting this
>
line always connects the outlets. You can check by placing a breakpoint there
>
and single-stepping.
>
>
There is, of course, an explanation for this, but space precludes giving it
>
here (actually, meaning, it's from the
>
wave-a-dead-chicken-school-of-voodoo-programming, but it works somehow ;-)).
The reason why this is occuring is in the documentation for:
-window
In NSWindowController. Now, perhaps the documentation at the top of the
file should explicitly mention this, but I won't go into any of my rants
about documentation, HelpViewer or ProjectBuilder...
It took me a while to find this out too...
Later,
--
David Rehring Psychos do not explode when light hits
Senior Software Engineer them, no matter how crazy they are...
Atimi Software, Inc.
www.atimi.com And totally insane guy!