//------------------------------------------------------------> // GlbIndexList.dg // // Lookup list of all indexes for the current data file //------------------------------------------------------------> // Register all objects Register_Object oCancel_bn Register_Object oIndex_list Register_Object oIndexLookUp Register_Object oOK_bn Use Windows.pkg CD_Popup_Object oIndexLookUp is a ModalPanel Set Minimize_Icon to TRUE On_Key KEnter Send KeyEnter Procedure KeyEnter Send Move_Value_Out To (oIndex_list(Current_Object)) End_Procedure Set Label to "Indexes" Set Location to 4 5 // Visual DataFlex 14.0 Client Size Adjuster, modified April 22, 2008: 20:37:23 // Set Size to 154 335 Set Size to 139 331 Object oIndex_list is a List Set Size to 105 320 Set Location to 6 6 Procedure Activating Forward Send Activating Send delete_data Send load_list End_Procedure Procedure Mouse_Click Integer iWin integer iChar Forward Send Mouse_Click iWin iChar Send Move_value_out End_Procedure Procedure load_list string sField# sFieldName sSegFieldNames integer iSeg# iSegments iIndex# iFile# iLastIndex Move FileNumber to iFile# get_Attribute DF_FILE_LAST_INDEX_NUMBER of iFile# to iLastIndex //-----------------------------------------------------> // Build a list of indexes and their segments //-----------------------------------------------------> For iIndex# From 0 to iLastIndex get_attribute DF_INDEX_NUMBER_SEGMENTS of iFile# iIndex# to iSegments Move "" to sSegFieldNames For iSeg# From 1 to iSegments get_Attribute DF_INDEX_SEGMENT_FIELD of iFile# iIndex# iSeg# to sField# get_Attribute DF_FIELD_NAME of iFile# sField# to sFieldName If (iSeg# < iSegments) Move (sSegFieldNames+sFieldName+", ") to sSegFieldNames Else Move (sSegFieldNames+sFieldName) to sSegFieldNames Loop SEND add_item msg_none sSegFieldNames Loop End_Procedure Procedure Move_Value_out integer iRC iPos String sSegments //--------------------------------------------> // Grab the first segment of the selected index //--------------------------------------------> Get current_item to iRC Get Value item iRC to sSegments Set piIndex# of (oReplace_View(Current_Object)) to iRC Move (Pos( ",",sSegments)) To iPos Set psIndex_Segment Of (oReplace_View(Current_Object)) To (Left(sSegments, (iPos-1))) Send Close_Panel End_Procedure End_Object // oIndex_list Object oOK_bn is a Button Set Label to "&Ok" Set Location to 112 222 Procedure OnClick Send Move_Value_Out To (oIndex_list(Current_Object)) End_Procedure End_Object // oOK_bn Object oCancel_bn is a Button Set Label to "&Cancel" Set Location to 112 277 Procedure OnClick Send Close_Panel End_Procedure End_Object // oCancel_bn Object oTextBox1 is a TextBox Set Auto_Size_State to False Set Size to 10 71 Set Location to 114 89 Set Label to "Do not use quotes!" Set FontWeight to 600 End_Object CD_End_Object // oIndexLookUp