I have a custom window controller that loads a nib file, then programmatically installs a toolbar. The first time the window is displayed on screen it blinks. The window is drawn without the toolbar, then it is drawn again with the toolbar. Visually is is like a blink.

// NSWindowController subclass

- (id)init
{
     self = [super initWithWindowNibName:@"MyWindowNib"];
     if (self) {
NSToolbar *toolbar = [[NSToolbar alloc] initWithIdentifier:@"MyToolbar"];
         [toolbar setDelegate:self];
         [[self window] setToolbar:toolbar];
         [toolbar release];
     }
     return self;
}

- (void)windowDidLoad
{
     // Installing toolbar here results in same blinking problem.
}

Does anyone know how to get the window to display the first time with the toolbar installed?

--Richard Somers

_______________________________________________

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

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

Reply via email to