Re: Cannot get toolbar to appear in window
Subject : Re: Cannot get toolbar to appear in window
From: "I. Savant" <email@hidden >
Date: Wed, 25 Apr 2007 15:21:14 -0400
Delivered-to: email@hidden
Delivered-to: email@hidden
Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=OTnoA2pGWgdmXAojzX8ur3f3/fzSqp9Pzy9GLuYM92sWmRi/f+lmM2iTU1eeLSIfUNGFRjUPDdIe78IsLuw5jgNYdHCBcm9DgTUWcUOwDFpDlrpuYEP6DzUuP4aNwkYnxseIoUQrGN7YJ2/h7v7LmcehiuAp26oTxuMdltEDpWA=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=iSda+hTnqi4hUhg08LtpDtUz92zagM8CanxozSVoBN40IyyGzoStoV1KhQ9mcFMzSz6ci3xmhDn2meGSeqIJpj48pQ6IeI42x2k704gOwumbmcUKpXTIQaCYpyIEJrguLlggmJyKd9JsXwZci5Ok8KGGoCLGgezkhj1oXE4qnKE=
On 4/25/07, Timothy Mowlem <email@hidden> wrote:
I cannot see why the toolbar doesn't appear since the correct method
was called. The method implmentation was:
NSLog(@"### setupToolbar");
NSToolbar *toolbar = [[NSToolbar alloc]
initWithIdentifier:@"mainToolbar"];
[toolbar autorelease];
[toolbar setAutosavesConfiguration:YES];
[toolbar setAllowsUserCustomization:YES];
[toolbar setDelegate:self];
[[NSApp mainWindow] setToolbar:toolbar];
... from the documentation: "This method returns nil if there is no
main window, if the application's nib file hasn't finished loading, if
the receiver is not active, or if the application is hidden."
I'm guessing either there is no main window or you're calling this
code before the nib has finished loading. Can't tell which, since
you've given only a partial code listing and don't state where this
code is called from.
--
I.S.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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/email@hidden
This email sent to email@hidden
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.