PR# 17912 Access to nearest and/or ultimate EV_WINDOW parent from a EV_WIDGET

Problem Report Summary
Submitter: thomas.beale
Category: EiffelVision
Priority: Medium
Date: 2011/10/25
Class: Feature Request
Severity: Non-critical
Number: 17912
Release: GPL Edition - windows
Confidential: No
Status: Open
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)
    info_dialog: EV_INFORMATION_DIALOG
    create info_dialog.make_with_text (a_text) -- or info_dialog.show_model_to_window (xxxx)

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...
To Reproduce

Problem Report Interactions