Skip navigation.
 
mlUnable to view Drawer
FROM : Frederick C. Lee
DATE : Mon Apr 04 03:24:13 2005

Greetings:
   I have a separate NIB for the Drawer with its own DrawerController as
the NIB's File Owner (instantiated with its 'Parent Window' parameter
passed from the Main Controller).  The actual Parent Window is defined
and instantiated  in the calling MainController.

{Drawer Controller/NIB} <---- {Main Controller/NIB that has its Parent
Window}
                                                <via drawer toggle
button>

Thus the Drawer Controller's init method looks like this:

- (id)initWithParentWindow:(NSWindow *)inWindow {
   [self setParentWindow:inWindow];
   [self setTheDrawer:[[NSDrawer alloc] init]];
   [[self theDrawer] setParentWindow:[self parentWindow]];
   return [self init];
}

The Following is the Toggle routine for the Drawer object (the
drawerBoxView is the 'context view'):

- (void)toggleDrawer {
   [[self theDrawer] toggle:nil];
   [drawerBoxView displayIfNeeded];  <-- display the controller's
context view.  It doesn't work.
   NSLog(@" in DrawerController.");
   return;
}

The debugger says that [theDrawer state] is '2', meaning that it's open.
But I don't see the drawer.  Only the parent window as displayed from
the main controller.

Toggling the Drawer changes its 'state' as expected.  But no visual
proof.  I've tried forcing it with 'displayIfNeeded' call.
But that doesn't do anything that I can see.

Question:  How can I make the drawer display as expected?

Regards,
Ric.

Related mailsAuthorDate
mlUnable to view Drawer Frederick C. Lee Apr 4, 03:24
mlRe: Unable to view Drawer Anish Kumar Apr 4, 07:09