I have a list form with detail lines that contain a button to show details in dialog. That form is maDetail0 which is a record form of details to be shown in dialog. It contains two tab panel forms. The referenced forms (maClient and maDetailTime) for the first tabs of each tab panel contain both onShow and onHide event methods.
At runtime, with the maDetail0 form displayed in dialog, the user switches to another tab on the second tab panel that displays another form (maCalendarTodo) that has no onShow nor onHide event methods. The user may click on a button in one of two portals on the (maCalendarTodo) form to view details of a record that also is shown in dialog (eventsentry). The first form in dialog disappears (I wish it wouldnM-^Rt, but I know why it does) and the second one is displayed. This second form has an onHide event method that does the following:
//closeEvent[eventsentry]
if ( globals.eventMaintFlag == ‘Add’ || globals.eventMaintFlag == ‘Change’ )
{
return (false)
}
else
{
application.closeFormDialog(false)
}
This method will keep the eventsentry form displayed if there is a maintenance transaction pending, else close just the eventsentry form in dialog. The functions perform as expected for the first eventsentry form, that is the underlying maDetail0 form in dialog shows up when the eventsentry form is closed. The problem is that if the user selects another detail record to display a new eventsentry form, the closeFormDialog statement acts as if it were written: application.closeFormDialog(true), that is, the underlying form in dialog(maDetail0) is closed.
Furthermore, when I run the methods with the debugger enabled the maDetail0 screen is always closed. That is the closeFormDialog instruction always behaves as though it was written application.closeFormDialog(true)
Servoy Developer
Version R2 2.1beta2-build 300
Java version 1.4.2_04-b05 (Windows 2000)