Tab bar button won't respond after overlay

I have a scene that creates a tabbar in the createscene function. When a user presses the button, the onPress event calls an overlay in which the user selects a value from a pickerwheel. The app goes back to the main scene by calling gotoscene. The problem is that the button on the tab bar won’t respond to the onPress event anymore after the app goes back to the main scene. The tab bar is visible and the other button responds, just not the button that originally called the overlay.

If I recreate the tab bar the button will work but this seems unnecessary?

Any suggestions on why this might be happening?

Thanks

Answered?

So I believe I tracked down the issue(or at least I think this is what is happening). It appears that the behavior is performing as it should. Once the button is selected it can’t be selected again. So I solved the issue by using object:setSelected(). When I go back to the main scene I simply added—> tabBar:setSelected(). Notice there are no values in the parenthesis which apparently leaves all the buttons in an ready state.

I’d be curious to know if my assumptions are correct. I can’t seem to find this documented anywhere but it seems to be one of those nuanced things you just learn as you grock the language.

Answered?

So I believe I tracked down the issue(or at least I think this is what is happening). It appears that the behavior is performing as it should. Once the button is selected it can’t be selected again. So I solved the issue by using object:setSelected(). When I go back to the main scene I simply added—> tabBar:setSelected(). Notice there are no values in the parenthesis which apparently leaves all the buttons in an ready state.

I’d be curious to know if my assumptions are correct. I can’t seem to find this documented anywhere but it seems to be one of those nuanced things you just learn as you grock the language.