I have inherited a new class from NSWindowController to implement windowDidLoad and then access to the NIB defined window controls:
- ( void ) windowDidLoad
{
NSArray * controls = [ [ [ self window ] contentView ] subviews ];
int i;
NSRunAlertPanel( @"windowDidLoad", @"", @"OK", NULL, NULL );
if( [ controls count ] == 0 )
NSRunAlertPanel( @"no hay controles", @"", @"OK", NULL, NULL );
for( i = 0; i < [ controls count ]; i++ )
NSRunAlertPanel( @"control", @"", @"OK", NULL, NULL );
}
code execution goes fine. The NIB window is shown, but subviews has no elements. How to access the window child controls ? Thanks,