Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Connecting NSToolbar and NSTabView



On 29 Aug 2008, at 15:52, Quincey Morris wrote:

On Aug 29, 2008, at 12:49, Quincey Morris wrote:

On Aug 29, 2008, at 08:20, David Reitter wrote:

To create a preference window with a NSToolbar at the top and a tabless NSTabView containing a few panels.
How would I go about connecting the two in Interface Builder?


I can set the NSToolbar selector to invoke takeSelectedTabViewItemFromSender on the NSTabView, which seems promising. But it seems that NSToolbar does not respond to indexOfSelectedItem, as it should for this to work.

The easiest way is probably to use IB to set each toolbar item identifier and its corresponding tab view item to the same string, and bind the tab view's "selectedIdentifier" binding to toolbar.selectedItemIdentifier.

Oops, meant to say "... and its corresponding tab view item identifier..."

Sorry, where in IB do I set the identifier of the NSToolbarItem? Is it just the Label? At least this is what can be bound.


Do I just call the toolbar 'prefstoolbar' in "Interface Builder Identity", in order to access it?
I don't quite understand how I can address the NSToolbar instance from the NSTabview.


Also, doesn't a delegate to the NSToolbar have to provide toolbarSelectableItemIdentifiers to make them permanently selectable?


_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Connecting NSToolbar and NSTabView (From: David Reitter <email@hidden>)
 >Re: Connecting NSToolbar and NSTabView (From: Quincey Morris <email@hidden>)
 >Re: Connecting NSToolbar and NSTabView (From: Quincey Morris <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.