Selecting a tab in NSTabView

Originator:maxlanger
Number:rdar://26070121 Date Originated:03-May-2016 09:15 PM
Status:Open Resolved:
Product:OS X Product Version:10.11.4
Classification: Reproducible:Always
 
Summary:
It is not possible to programmatically select a tab in NSTabView when it is attached to a NSTabViewController. NSTabViews selectTabViewItemAtIndex: method has no effect at all. To select a tab by index programmatically, it has to be done via NSTabViewController. The property to modify is selectedTabViewItemIndex.

Steps to Reproduce:
1. Setup a NSTabViewController and try to select a tab by its index.
2. See that it only works when using NSTabViewControllers selectedTabViewItemIndex.

Expected Results:
The tab should be selectable by NSTabViews own methods, not just the one provided by NSTabViewController.

Actual Results:
Selecting the tab using NSTabView has no effect.

Notes:
I found this bug by answering the following StackOverflow question:
http://stackoverflow.com/questions/37005622/control-a-nstabviewcontroller-from-parent-view/37012322#37012322

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!