• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Cannot get toolbar to appear in window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cannot get toolbar to appear in window


  • Subject: Re: Cannot get toolbar to appear in window
  • From: Murat Konar <email@hidden>
  • Date: Wed, 25 Apr 2007 12:32:25 -0700

I think I.S. is on to something here. Try adding an outlet to your app delegate and connect it to your window. Then use that instead of [NSApp mainWindow] when you set the toolbar.

_murat


On Apr 25, 2007, at 12:21 PM, I. Savant wrote:

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:
This email sent to email@hidden
_______________________________________________

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:
This email sent to email@hidden


References: 
 >Cannot get toolbar to appear in window (From: Timothy Mowlem <email@hidden>)
 >Re: Cannot get toolbar to appear in window (From: "I. Savant" <email@hidden>)

  • Prev by Date: Re: Cannot get toolbar to appear in window
  • Next by Date: Re: Simple Interface Connection Question
  • Previous by thread: Re: Cannot get toolbar to appear in window
  • Next by thread: Re: Cannot get toolbar to appear in window
  • Index(es):
    • Date
    • Thread