I thought it would be a good idea to have a clear out of some of the redundant scripts and functions from my data dictionary.
I have got them into a table and can display the list in an Xdialog Box. Is it possible to tell Xbasic to delete any of the selected scripts/functions from this dialog box as I cant find any obvious method in the help file??
I have got them into a table and can display the list in an Xdialog Box. Is it possible to tell Xbasic to delete any of the selected scripts/functions from this dialog box as I cant find any obvious method in the help file??
Code:
sys_obj_filename = "c:\my databases\aviation\txt\enumeration.txt" IF file.exists(sys_obj_filename) THEN file.remove(sys_obj_filename) END IF sys_obj_list = <<%str% Copy Export Join Update append import library mark menu post query report script udf %str% FOR each tag in sys_obj_list statusbar.set_text("processing "+tag) tag = alltrim(tag) evaluate_template(evaluate_string("{tag}_list = :a5.{tag}_enum(8)")) evaluate_template(evaluate_string("save_to_file({tag}_list+crlf(),\"{sys_obj_filename}\",.t.)")) next t = table.open("enum_sys_obj",FILE_RW_EXCLUSIVE) t.zap(.t.) t.close() t = table.open("enum_sys_obj") t.Import_Ascii_Table(sys_obj_filename,0,.t.) DIM SHARED varC_sys_obj as C DIM SHARED varC_result as C auto_list_varC_sys_obj = table.external_record_content_get("enum_sys_obj","Object_Name","","") temp_count = w_count(auto_list_varC_sys_obj,crlf()) DELETE a_varC_sys_obj DIM a_varC_sys_obj[temp_count] as c a_varC_sys_obj.initialize(auto_list_varC_sys_obj) heading_string = "Select Scripts to Delete" ok_button_label = "&OK" cancel_button_label = "&Cancel" varC_result = ui_dlg_box("Script Maintenance",<<%dlg% {region} {text=113,1:heading_string}; {endregion}; {region} | [%E%.98,25varC_sys_obj^#a_varC_sys_obj]; {endregion}; {line=1,0}; {region} <*15=ok_button_label!OK> <15=cancel_button_label!CANCEL> {endregion}; %dlg%) if varC_result = "ok" then ' 'delete selected scripts from dictionary file *.ddd ' ' end if
Comment