> > 481 + tabs.selectedTabIndex = 1
> >
> > This looks useless as well.
>
> I using selectedTabIndex to change tab to MonthView, when some one click on
> year view. do you mean I need to do something else ?
Sorry, you’re right, I don’t know what I was thinking when I wrote that. That said, there’s a cleaner way to write this, that will ensure it remains correct even if tabs get reordered in the future:
tabs.selectedTabIndex = monthTab.index
(and the same applies to other assignments of tabs.selectedTabIndex)
> > 481 + tabs.selectedTa bIndex = 1
> >
> > This looks useless as well.
>
> I using selectedTabIndex to change tab to MonthView, when some one click on
> year view. do you mean I need to do something else ?
Sorry, you’re right, I don’t know what I was thinking when I wrote that. That said, there’s a cleaner way to write this, that will ensure it remains correct even if tabs get reordered in the future:
tabs. selectedTabInde x = monthTab.index
(and the same applies to other assignments of tabs.selectedTa bIndex)