arcade icon indicating copy to clipboard operation
arcade copied to clipboard

User feedback: Warning from UIManager(auto_enable=True) is confusing

Open einarf opened this issue 3 years ago • 6 comments

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.

einarf avatar Mar 31 '22 08:03 einarf

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.

alejcas avatar Mar 31 '22 11:03 alejcas

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?

einarf avatar Mar 31 '22 12:03 einarf

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.

alejcas avatar Mar 31 '22 12:03 alejcas

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".

eruvanos avatar Mar 31 '22 17:03 eruvanos

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.

alejcas avatar Mar 31 '22 20:03 alejcas

Removed the auto_enable from constructor (2.7)

eruvanos avatar Jun 22 '22 19:06 eruvanos