• 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 and .toolbar files.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSToolbar and .toolbar files.


  • Subject: Re: NSToolbar and .toolbar files.
  • From: Greg Titus <email@hidden>
  • Date: Fri, 28 Sep 2001 10:20:54 -0700

On Friday, September 28, 2001, at 09:49 AM, Chris Boot wrote:

Hi,

I've noticed several applications (Address Book, OmniWeb) which use .toolbar
files in their resources to define the behavior of toolbars. Is there any
way of easily using such files, or do I have to reinvent the wheel? I've
looked through the AppKit and OmniAppKit, but can't find any information in
either of those.


Nope. At least in our case (Omni apps) we are just writing some code in each app to load the .toolbar dictionary and then set the toolbar up in the toolbar delegate methods:

-toolbarDefaultItemIdentifiers:
(return the array from the .toolbar plist)
-toolbarAllowedItemIdentifiers:
(return the array from the .toolbar plist)
-toolbar:itemForItemIdentifier:willBeInsertedIntoToolbar:
(set the label, paletteLabel, toolTip, target and action from the .toolbar plist)

The code is just as simple as you'd expect it to be.

It would be nice to add some sort of generic toolbar controller class to OmniAppKit, but that hasn't happened yet.

Hope this helps,
--Greg


References: 
 >NSToolbar and .toolbar files. (From: Chris Boot <email@hidden>)

  • Prev by Date: Re: Text over graphics
  • Next by Date: Re: Security-related APIs
  • Previous by thread: NSToolbar and .toolbar files.
  • Next by thread: concludeDragOperation, slide back, then crash
  • Index(es):
    • Date
    • Thread