Passing Data from the Dialog Box to the Window
The dialog box passes the data the user entered (such as the date range) back to the calling window by calling the End_Dialog subroutine in its CLOSE event. Suppose the dialog box contains two edit line controls (START_DATE and END_DATE) which contain the date range. The code below will pass the values back to the calling window:
declare function get_property, set_property, send_event declare subroutine end_dialog $insert Ctrl_Property_Equates ctrls = @window: '.BEGIN_DATE' : @rm : @window : '.END_DATE' props = DEFPROP$ : @rm : DEFPROP$ RtnData = Get_Property(Ctrls, props) convert @rm to @fm in RtnData * * now return the data * End_Dialog( 'COLLECTORWINDOW', RtnData)
The text (the default property of an edit line) is stored in RtnData as a record-mark delimited variable, through the Get_Property() call. After converting the record marks to field marks, RtnData can be passed back to the calling window by calling the End_Dialog subroutine.