• 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: Toolbar Example
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Toolbar Example


  • Subject: Re: Toolbar Example
  • From: Anthony Smith <email@hidden>
  • Date: Fri, 10 Jul 2009 01:31:49 -0400

Thanks. I messed around with selector and didn't think I was heading down the right path. The direction helps. I think I'll be able to handle it from here.

On Jul 10, 2009, at 1:28 AM, Graham Cox wrote:


On 10/07/2009, at 3:20 PM, Anthony Smith wrote:

Can anybody recommend a toolbar example using Interface Builder? All the ones I've seen manage toolbars through code. I'm just trying to get my toolbar items to enable. I'm sure it's dead simple but I'm still trying to wrap my head around bindings and key/value coding. Thanks.


You don't really need to write any code for toolbars. Just hook up the targets and actions of the toolbar items to the relevant places and it should work. Like menu items, by default a toolbar item is enabled if its target responds to the action method selector, or you can override -validateUserInterfaceItem: to provide more control. If your items are shown disabled, have you actually connected the action and target?

n.b. KVC and/or bindings are not required.

--Graham



Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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: 
 >Toolbar Example (From: Anthony Smith <email@hidden>)
 >Re: Toolbar Example (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Toolbar Example
  • Next by Date: Retain cycles with NIB instantiations, bindings
  • Previous by thread: Re: Toolbar Example
  • Next by thread: NSSavePanel delegate Methods called by NSOpenPanel
  • Index(es):
    • Date
    • Thread