User feedback: Warning from UIManager(auto_enable=True) is confusing
Multiple people have reported this error message as confusing. Some users also don't seem to understand that you need to enable and disable the manager when a view is shown and hidden. We could clean up this error message and include a bit more info in api docs.
Also related to this:
It's really disgusting when you switch views with UI elements with event handlers active. You have to manually call manager.disable() on all the managers.
It should be possible to automatically remove the UI managers event handlers when switching views. So no manual call to manager.disable().
In fact, Window.show_view(view) already removes the old view event handlers and sets the new one BUT it doesn't remove event handlers set in the view by UI Manager elements. Maybe that method should also try to remove any UIManager event handlers set.
Assuming only one manager can be active at a time (I honestly don't know) we can keep a weakref to the active manager somewhere and automatically disable it when a new manager is enabled?
Maybe @eruvanos can help here? I have a project with multiple managers so tracking just one wouldn't help.
Somehow the View should track UManager instances and disable them when on_hide_view?
The on_show_view should not enable them automatically because you can have UIElements hidden that should not be enabled when the view is shown.
With 2.7 Widgets can be visible=False, so they will not be shown and also interactions are not processed. Beside that, I am up for discussions, what makes sense for most of the users. Not sure about the "should track".
With 2.7 Widgets can be visible=False, so they will not be shown and also interactions are not processed. Beside that, I am up for discussions, what makes sense for most of the users. Not sure about the "should track".
Yep, with the 2.7 GUI just one UIManager is all you need and therefore no need to auto disable it. So, ignore my previous comment.
Removed the auto_enable from constructor (2.7)