//------------------------------------------------------------> // GlbFileList.dg // // List of data files in the current workspace //------------------------------------------------------------> // Register all objects Register_Object oFile_List Register_Object OCancel_bn Register_Object OOK_bn Register_Object oFileLookUp Use Windows.pkg CD_Popup_Object oFileLookUp is a ModalPanel Set Minimize_Icon to TRUE On_Key KEnter Send KeyEnter On_Key KCancel Send Close_Panel Procedure KeyEnter Send Move_Value_Out to oFile_List End_Procedure Set Label to "Data Files" Set Location to 4 5 // Visual DataFlex 14.0 Client Size Adjuster, modified April 22, 2008: 20:37:23 // Set Size to 155 133 Set Size to 140 129 Object oFile_Array is an array End_Object Object oFile_List is a List Set Size to 105 114 Set Location to 6 7 Procedure Mouse_Click Integer iWin integer iChar Forward Send Mouse_Click iWin iChar Send Move_value_out End_Procedure Procedure Activating Forward Send Activating Send Delete_data Send Load_list End_Procedure function verify_file string sTemp_file returns integer integer iRC get item_matching sTemp_file to iRC function_return iRC end_function //---------------------------------------------------------------------> // We stash the file number to obtain it from the file name when // selected since we use the number to open the file. //---------------------------------------------------------------------> Procedure Load_list String sUser sName Integer iArray_obj Move (oFile_Array(Self)) to iArray_Obj Move 0 To Filenumber Repeat Filelist Next To sUser sName If (FOUND) Begin Send Add_item Msg_none sName Set Array_value of iArray_obj item (Item_count(iArray_obj)) to Filenumber END UNTIL (Not(FOUND)) send sort_items ascending End_Procedure Procedure Move_value_out Integer iCI String sFileName GET current_item to iCI //---------------------------------------------------------------------> // Set DF Internal Variable Filenumber //---------------------------------------------------------------------> Get Integer_value of oFile_array item iCI to FileNumber Get Value iCI to sFileName Set psFileName to sFileName Send Close_Panel End_Procedure End_Object // oFile_List Object OOK_bn is a Button Set Label to "&Ok" Set Location to 113 13 Procedure OnClick Send Move_Value_Out to oFile_list End_Procedure End_Object // OOK_bn Object OCancel_bn is a Button Set Label to "&Cancel" Set Location to 113 67 Procedure OnClick Send Close_Panel End_Procedure End_Object // OCancel_bn CD_End_Object // oFileLookUp