PR# 17912 Access to nearest and/or ultimate EV_WINDOW parent from a EV_WIDGET
Problem Report Summary
Class: Feature Request
Release: 220.127.116.1127 GPL Edition - windows
Environment: Mozilla/5.0 (Windows NT 6.1; rv:7.0.1) Gecko/20100101 Firefox/7.0.1
Synopsis: Access to nearest and/or ultimate EV_WINDOW parent from a EV_WIDGET
I often have to put an info dialog on the screen , as follows: show_text_in_dialog (a_text: STRING) local info_dialog: EV_INFORMATION_DIALOG do create info_dialog.make_with_text (a_text) info_dialog.show -- or info_dialog.show_model_to_window (xxxx) end To make it work properly, the call should be info_dialog.show_model_to_window, but that requires access to the reference to the application EV_WINDOW. This is not usually available unless being made global or passed around in some clunky fashion. But since a local reference to an EV_WIDGET currently displayed is always available, it would make sense to have a call like info_dialog.show_model_to_window (local_ev_widget.ultimate_parent). EV_WIDGET.parent is defined, but there seems no built-in way to get to the ultimate (or even nearest) EV_WINDOW up the tree. I could do this manually, but it really seems like functionality that should be built-in...
Problem Report Interactions