• 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: NSToolBar : Unable to add a seperator item in the toolBar
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSToolBar : Unable to add a seperator item in the toolBar


  • Subject: Re: NSToolBar : Unable to add a seperator item in the toolBar
  • From: Peter Ammon <email@hidden>
  • Date: Tue, 19 May 2009 11:30:29 -0700

This code is correct. You may have customized the toolbar as a user, so that toolbarDefaultItemIdentifiers is not called. In that case, you can throw away the preferences file for testing. Otherwise, you'll have to explain what you mean by "not working."

On May 19, 2009, at 10:26 AM, Arun wrote:

Hi,
I have an application in which i added 2 buttons and one search view in the
too bar. I need to insert a seperator in between search view and 2 buttons.
I have tried the following in my code. and it is not working. Any idea?


- (NSArray *) toolbarAllowedItemIdentifiers: (NSToolbar *) toolbar
{
   return [NSArray arrayWithObjects:[NSString
stringWithString:serachIdentifier],
           NSToolbarSeparatorItemIdentifier,
           [NSString stringWithString:Button1ToolbarItemIdentifier],
           [NSString stringWithString:Button2ToolbarItemIdentifier],
            nil];
}

- (NSArray *) toolbarDefaultItemIdentifiers: (NSToolbar *) toolbar
{
   return [NSArray arrayWithObjects:searchIdentifier,
           NSToolbarSeparatorItemIdentifier,
           Button1ItemIdentifier,
           Button2ItemIdentifier, nil];
}


Thanks Arun KA

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


References: 
 >NSToolBar : Unable to add a seperator item in the toolBar (From: Arun <email@hidden>)

  • Prev by Date: Re: When init returns nil does it cause a leak
  • Next by Date: TableView & TextFieldCell question...
  • Previous by thread: NSToolBar : Unable to add a seperator item in the toolBar
  • Next by thread: Tools in App Bundles
  • Index(es):
    • Date
    • Thread