home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-05-19 | 66.9 KB | 1,962 lines |
- // dfhelp.src (help maintenance program)
- // March 2, 1992
- // LS
-
- use dfhelp // help maintenance utility header package
-
- //////////////////////////////////
- ////////////////////////////////// global variables
- //////////////////////////////////
-
- string current_grp current_sbj current_xrf current_ctx current_pth
- move EMPTY_STRING to current_grp
- move EMPTY_STRING to current_sbj
- move EMPTY_STRING to current_xrf
- move EMPTY_STRING to current_ctx
- move EMPTY_STRING to current_pth
-
- indicator testing_state
- indicate testing_state false
-
- //////////////////////////////////
- ////////////////////////////////// obj/proc/func registrations for fwd ref
- //////////////////////////////////
-
- register_object main
- register_object help_editor
- register_object status_bar
- register_object grp_prompt
- register_object sbj_prompt
- register_object verify_del
- register_function verify_delete_xrf string filename string related returns integer
-
- //////////////////////////////////
- ////////////////////////////////// global procedures
- //////////////////////////////////
-
- procedure deactivate_area for desktop
- send deactivate area_type
- end_procedure
-
- function cb_return_value for desktop returns string
- local string ret_val
-
- get value of clipboard item 0 to ret_val
- trim ret_val to ret_val
-
- if ret_val le EMPTY_STRING begin
- error 93 "Expected value not returned from program"
- end
- else begin
- send goto_line to clipboard 0
- send delete_line to clipboard
- end
-
- function_return ret_val
- end_function
-
- //////////////////////////////////
- ////////////////////////////////// augmentations to help_object class to
- ////////////////////////////////// override default help access
- //////////////////////////////////
-
- procedure request_help for (class(help_object.obj)) integer msg_id integer arg
- local integer orig_grp orig_sbj orig_xrf orig_ctx
- local string old_grp_filename old_sbj_filename old_xrf_filename old_ctx_filename
- local string cur_grp_filename cur_sbj_filename cur_xrf_filename cur_ctx_filename
-
- move current_pth to cur_grp_filename
- append cur_grp_filename current_grp
- move current_pth to cur_sbj_filename
- append cur_sbj_filename current_sbj
- move current_pth to cur_xrf_filename
- append cur_xrf_filename current_xrf
- move current_pth to cur_ctx_filename
- append cur_ctx_filename current_ctx
-
- if cur_grp_filename gt EMPTY_STRING begin
- move grp.recnum to orig_grp
- close grp
- end
- if cur_sbj_filename gt EMPTY_STRING begin
- move sbj.recnum to orig_sbj
- close sbj
- end
- if cur_xrf_filename gt EMPTY_STRING begin
- move xrf.recnum to orig_xrf
- close xrf
- end
- if cur_ctx_filename gt EMPTY_STRING begin
- move ctx.recnum to orig_ctx
- close ctx
- end
-
- [testing_state] begin
- get group_filename of help_object to old_grp_filename
- get subject_filename of help_object to old_sbj_filename
- get link_filename of help_object to old_xrf_filename
- get context_filename of help_object to old_ctx_filename
-
- set group_filename of help_object to cur_grp_filename
- set subject_filename of help_object to cur_sbj_filename
- set link_filename of help_object to cur_xrf_filename
- set context_filename of help_object to cur_ctx_filename
- end
-
- if num_arguments gt 1 send msg_id arg
- else send msg_id
-
- [testing_state] begin
- set group_filename of help_object to old_grp_filename
- set subject_filename of help_object to old_sbj_filename
- set link_filename of help_object to old_xrf_filename
- set context_filename of help_object to old_ctx_filename
- end
-
- if cur_grp_filename gt EMPTY_STRING begin
- open cur_grp_filename as grp
- clear grp
- if orig_grp ne 0 begin
- move orig_grp to grp.recnum
- find eq grp.recnum
- end
- end
- if cur_sbj_filename gt EMPTY_STRING begin
- open cur_sbj_filename as sbj
- clear sbj
- if orig_sbj ne 0 begin
- move orig_sbj to sbj.recnum
- find eq sbj.recnum
- end
- end
- if cur_xrf_filename gt EMPTY_STRING begin
- open cur_xrf_filename as xrf
- clear xrf
- if orig_xrf ne 0 begin
- move orig_xrf to xrf.recnum
- find eq xrf.recnum
- end
- end
- if cur_ctx_filename gt EMPTY_STRING begin
- open cur_ctx_filename as ctx
- clear ctx
- if orig_ctx ne 0 begin
- move orig_ctx to ctx.recnum
- find eq ctx.recnum
- end
- end
- end_procedure
-
- //////////////////////////////////
- ////////////////////////////////// global procedures for testing Help
- ////////////////////////////////// currently being edited
- //////////////////////////////////
-
- procedure test_extended_help for desktop
- indicate testing_state true
- send request_help to help_object msg_view_context_help current_object
- indicate testing_state false
- end_procedure
-
- procedure test_help_for_help for desktop
- indicate testing_state true
- send request_help to help_object msg_view_help_for_help
- indicate testing_state false
- end_procedure
-
- procedure test_help_index for desktop
- indicate testing_state true
- send request_help to help_object msg_view_help_index
- indicate testing_state false
- end_procedure
-
- procedure test_keys_help for desktop
- indicate testing_state true
- send request_help to help_object msg_view_keys_help
- indicate testing_state false
- end_procedure
-
- //////////////////////////////////
- ////////////////////////////////// classes
- //////////////////////////////////
-
- class import_export_client is a client
- register_function filename returns string
-
- procedure construct_object integer img integer form_img integer btns_img
- forward send construct_object img
-
- set block_mouse_state to true
- set popup_state to true
- set scope_state to true
-
- set center_state item 0 to true // for title
-
- object file is a form form_img
- item_list
- on_item EMPTY_STRING send next
- set autoclear_state to true
- end_item_list
-
- on_key ksave_record send request_ok private
- on_key kcancel send cancel private
- end_object
-
- object buttons is a button btns_img
- item_list
- on_item F2_OK_TEXT send request_ok
- on_item ESC_CANCEL_TEXT send cancel
- on_item F1_HELP_TEXT send help
- end_item_list
-
- on_key ksave_record send request_ok private
- on_key kcancel send cancel private
- end_object
- end_procedure
-
- procedure request_ok
- local string fname
-
- get filename to fname
- if fname le EMPTY_STRING procedure_return
- else procedure_return msg_ok
- end_procedure
-
- function filename returns string
- local string ret_val
-
- get value of (file(current_object)) item 0 to ret_val
- function_return ret_val
- end_function
-
- procedure set title_name string val
- set value item 0 to val
- end_procedure
- end_class
-
- class prompt_client_button is a key_button
- procedure construct_object integer img
- forward send construct_object img
-
- item_list
- on_item F4_PROMPT_TEXT send prompt to (parent(current_object))
- on_item ESC_CANCEL_TEXT send request_cancel_area
- on_item F1_HELP_TEXT send help
- end_item_list
- end_procedure
-
- procedure set shadow_prompt_state integer flag
- set shadow_state item 0 to flag
- end_procedure
-
- function shadow_prompt_state returns integer
- local integer flag
-
- get shadow_state item 0 to flag
- function_return flag
- end_function
- end_class
-
- class help_editor_pull_down_menu is a pull_down_menu
- procedure activate
- local integer sco id ss tot
-
- set_deferred 1
- forward send activate
-
- get prior_scope to sco
- if sco eq 0 move desktop to sco
-
- if (sco = help_editor(main(desktop))) move 0 to ss
- else move 1 to ss
-
- move (item_count(current_object) - 1) to tot
-
- for id from 0 to tot
- set shadow_state item id to ss
- loop
-
- set_deferred 0
- end_procedure
- end_class
-
- class xrf_constraint_data_set is a data_set
- procedure construct_object integer img
- forward send construct_object img
-
- property integer constrain_to_grp public 0
- property integer constrain_to_sbj public 0
- end_procedure
-
- procedure constrain
- local integer flag
-
- forward send constrain
-
- get constrain_to_grp to flag
- if flag constrain xrf relates to grp
- get constrain_to_sbj to flag
- if flag constrain xrf relates to sbj
- end_procedure
- end_class
-
- class ctx_table is a table
- procedure construct_object integer img
- forward send construct_object img
-
- property integer new_record_state public 0
-
- on_key kclear_all send none
- on_key ksuper_find send none
- on_key ksuper_find_next send none
- on_key ksuper_find_previous send none
- end_procedure
-
- procedure deactivating
- forward send deactivating
- clear ctx
- end_procedure
-
- function name_required integer itm returns integer
- local string temp_name
-
- get value item itm to temp_name
- if temp_name le "" function_return 1
- end_function
-
- function update_row integer row# returns integer
- local integer chg b_itm
-
- get row_changed row# to chg
-
- if chg begin
- get base_item to b_itm
-
- if (name_required(current_object,b_itm) and ;
- name_required(current_object,b_itm+1) and ;
- name_required(current_object,b_itm+2)) begin
- error 13
- function_return 1
- end
-
- send save_row
- end
- end_function
-
- procedure request_save
- local integer cur_row ret_val
-
- get current_row to cur_row
- get update_row cur_row to ret_val
- end_procedure
-
- procedure refind_ctx integer old_rec
- clear ctx
- if old_rec ne 0 begin
- move old_rec to ctx.recnum
- find eq ctx.recnum
- end
- end_procedure
-
- procedure save_row
- local integer old_recnum chg obj
-
- get current_record to old_recnum
- clear ctx
- send entry_update ctx.file_number 1
-
- move 0 to chg
- ifchange ctx move 1 to chg
-
- if chg begin
- find eq ctx.hlp_name
- [not found] send refind_ctx old_recnum
-
- reread
- send entry_update ctx.file_number 0
- save ctx
- unlock
-
- set current_record to ctx.recnum
- get server to obj
- send request_assign to obj 0
- end
- else send refind_ctx old_recnum // if not changed
- end_procedure
-
- function row_changed integer row# returns integer
- local integer ret_val
-
- if (new_record_state(current_object)) function_return 0
-
- forward get row_changed row# to ret_val
- function_return ret_val
- end_function
-
- procedure add_or_remove_row
- local integer new_rec
-
- get new_record_state to new_rec
- set new_record_state to (current_record(current_object) = 0)
- forward send add_or_remove_row
- set new_record_state to new_rec
- end_procedure
- end_class
-
- //////////////////////////////////
- ////////////////////////////////// data sets
- //////////////////////////////////
-
- // data sets for main help editor
-
- object grp_data is a data_set no_image main_file grp
- set focus_mode to no_activate
- end_object
-
- object sbj_data is a data_set no_image main_file sbj
- set focus_mode to no_activate
- end_object
-
- object xrf_data is an xrf_constraint_data_set no_image ;
- main_file xrf updating grp_data sbj_data
-
- set focus_mode to no_activate
- set auto_fill_state to true
-
- set constrain_to_grp to true
- set constrain_to_sbj to true
-
- object ctx_data is a data_set no_image main_file ctx
- set focus_mode to no_activate
- end_object
- end_object /
-
- // data sets for prompt objects
-
- object grp_prompt_data is a data_set no_image main_file grp
- set focus_mode to no_activate
- end_object
-
- object sbj_prompt_data is a data_set no_image main_file sbj
- set focus_mode to no_activate
- end_object
-
- object xrf_prompt_data is an xrf_constraint_data_set no_image ;
- main_file xrf updating grp_prompt_data sbj_prompt_data
-
- set focus_mode to no_activate
-
- set constrain_to_grp to false
- set constrain_to_sbj to false
- end_object
-
- //////////////////////////////////
- ////////////////////////////////// main object definitions
- //////////////////////////////////
-
- /title_img
- _______________________________________________________________________________
- /*
-
- object title is a title title_img
- set center_state item 0 to true
- set location to 0 0 relative
- set value item 0 to "Help Maintenance Utility"
- end_object
-
- /main_img
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- /*
-
- class main_help_client is a client
- procedure construct_object integer img
- forward send construct_object img
-
- property integer current_grp_record public 0
- property integer current_sbj_record public 0
- property integer current_xrf_record public 0
- end_procedure
- end_class
-
- object main is a main_help_client main_img
- set location to 2 0 relative
-
- /main_action_bar_img
- ____ ______ ____ ___________ ____ ____
- /file_pd_img
- ┌────────────────┐
- │ ______________ │
- │ ______________ │
- ├────────────────┤
- │ ______________ │
- └────────────────┘
- /record_pd_img
- ┌───────────────────────────────┐
- │ _____________________________ │
- │ _____________________________ │
- │ _____________________________ │
- │ _____________________________ │
- │ _____________________________ │
- │ _____________________________ │
- │ _____________________________ │
- │ _____________________________ │
- │ _____________________________ │
- │ _____________________________ │
- │ _____________________________ │
- │ _____________________________ │
- └───────────────────────────────┘
- /text_pd_img
- ┌─────────────────────────────┐
- │ ___________________________ │
- │ ___________________________ │
- ├─────────────────────────────┤
- │ ___________________________ │
- │ ___________________________ │
- │ ___________________________ │
- │ ___________________________ │
- │ ___________________________ │
- │ ___________________________ │
- │ ___________________________ │
- └─────────────────────────────┘
- /maint_pd_img
- ┌────────────────────┐
- │ __________________ │
- │ __________________ │
- │ __________________ │
- │ __________________ │
- │ __________________ │
- │ __________________ │
- │ __________________ │
- │ __________________ │
- └────────────────────┘
- /test_pd_img
- ┌──────────────────┐
- │ ________________ │
- │ ________________ │
- │ ________________ │
- │ ________________ │
- └──────────────────┘
- /*
-
- create_menu action_bar main_action_bar_img location -1 0 relative
- set action_bar_keys_msg to main_action_bar_keys
-
- on_item "File" begin_pull_down file_pull_down file_pd_img
- on_item "Open..." send open to main
- on_item "New..." send new to main
- on_item "Exit Alt+F4" send exit_program to main
- end_pull_down
-
- register_object record_pull_down
- on_item "Record" send activate_pull_down to (record_pull_down(current_object))
-
- object record_pull_down is a help_editor_pull_down_menu record_pd_img
- item_list
- on_item "Clear F5" send Request_Clear
- on_item "Clear all Ctrl+F5" send Request_Clear_All
- on_item "Delete Shift+F2" send Request_Delete
- on_item "Find F9" send Find_GE
- on_item "Next F8" send Find_Next
- on_item "Previous F7" send Find_Previous
- on_item "Superfind Shift+F9" send Superfind
- on_item "Superfind next Shift+F8" send Superfind_Next
- on_item "Superfind previous Shift+F7" send Superfind_Previous
- on_item "Find first Ctrl+Home" send Beginning_Of_Data
- on_item "Find last Ctrl+End" send End_Of_Data
- on_item "Save F2" send Request_Save
- end_item_list
- end_object
-
- register_object text_pull_down
- on_item "Text" send activate_pull_down to (text_pull_down(current_object))
-
- object text_pull_down is a shadow_text_pull_down_menu text_pd_img
- item_list
- on_item "Start of text Ctrl+Home" send beginning_of_data
- on_item "End of text Ctrl+End" send end_of_data
- on_item "Block mark Ctrl+\" send mark_block
- on_item "Column mark" send mark_column
- on_item "Cut marked text Alt+-" send cut_marked_area
- on_item "Copy marked text Ctrl+-" send copy_marked_area
- on_item "Paste text Alt+=" send paste_block
- on_item "Export marked text..." send export_marked_area
- on_item "Import text..." send import_text
- end_item_list
- end_object
-
- register_object maint_pull_down
- on_item "Maintenance" send activate_pull_down to (maint_pull_down(current_object))
-
- object maint_pull_down is a help_editor_pull_down_menu maint_pd_img
- item_list
- on_item "Group..." send group to main
- on_item "Subject..." send subject to main
- on_item "Cross reference..." send cross_reference to main
- on_item "Context..." send context to main
- on_item "Cleanup..." send cleanup to main
- on_item "Import..." send import to main
- on_item "Erase data..." send erase_data to main
- on_item "Re-order data..." send reorder_data to main
- end_item_list
- end_object
-
- register_object test_pull_down
- on_item "Test" send activate_pull_down to (test_pull_down(current_object))
-
- object test_pull_down is a help_editor_pull_down_menu test_pd_img
- item_list
- on_item "Help for help..." send test_help_for_help
- on_item "Extended help..." send test_extended_help
- on_item "Keys help..." send test_keys_help
- on_item "Help index..." send test_help_index
- end_item_list
- end_object
-
- #INCLUDE HELPA_PD.INC
-
- on_key kcancel send exit_area private
- end_menu
-
- procedure main_action_bar_keys for desktop integer obj
- on_key key_alt+key_f send activate to (file_pull_down(obj)) private
- on_key key_alt+key_r send activate to (record_pull_down(obj)) private
- on_key key_alt+key_t send activate to (text_pull_down(obj)) private
- on_key key_alt+key_m send activate to (maint_pull_down(obj)) private
- on_key key_alt+key_e send activate to (test_pull_down(obj)) private
- on_key key_alt+key_h send activate to (help_pull_down(obj)) private
- end_procedure
-
- /help_editor_img
- ┌─────────────────────────────────────────────────────────────┐
- │_____________________________________________________________│
- │ │
- │ │
- │ │
- │ ┌ Subject text: ──────────────────────────────────────────┐ │
- │ │ │ │
- │ │ │ │
- │ │ │ │
- │ │ │ │
- │ │ │ │
- │ │ │ │
- │ │ │ │
- │ │ │ │
- │ │ │ │
- │ │ │ │
- │ └─────────────────────────────────────────────────────────┘ │
- │ │
- │ │
- └─────────────────────────────────────────────────────────────┘
- /topic_img
- Group: _________________________________
- Subject: _________________________________
- /link_status_img
- Linked:
- ___
- /help_editor_keys_img
- ____________________________ ________________________
- ___________ __________________ _________
- /*
- //<Alt+F1=Context assignments> <Alt+F2=Find by context>
- // <F4=Prompt> <Alt+F9=Zoom text> <F1=Help>
-
- /help_editor_left_zoom_img
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- /help_editor_right_zoom_img
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- /help_editor_zoom_keys_img
- ____________________ _________
- /*
- // <Alt+F9=Cancel zoom> <F1=Help>
-
- object help_editor is an entry_client help_editor_img ring popup ;
- using xrf_data action_bar (action_bar(main.obj))
-
- register_function verify_xrf_delete returns integer
- register_object text
-
- set attach_parent_state to true
- set location to 0 9 relative
- set scope_state to true
- set verify_delete_msg to get_verify_xrf_delete
-
- set center_state item 0 to true
- set value item 0 to "Help Topics"
-
- object topic is an entry_form topic_img
- set auto_clear_deo_state to false
- set location to 3 2 relative
-
- item_list
- entry_item grp.grp_name { autofind, iprompt=(grp_prompt(main.obj)) }
- entry_item sbj.sbj_name { iprompt=(sbj_prompt(main.obj)) }
- end_item_list
-
- on_key key_alt+key_f1 send edit_contexts
- on_key key_alt+key_f2 send find_by_context
- on_key kcancel send activate to (action_bar(main.obj))
- on_key kexit_function send none
- on_key kzoom send zoom_text_area
-
- procedure request_clear
- send request_clear_all
- end_procedure
-
- procedure request_delete
- local integer obj
-
- indicate err false
- forward send request_delete
- [not err] get server to obj
- [not err] send clear to obj
- end_procedure
-
- function name_required integer itm returns integer
- local string temp_name
-
- get value item itm to temp_name
- if temp_name le "" begin // don't save blank records
- error 13
- if (focus(desktop)) ne current_object send activate
- set current_item to itm
- function_return 1
- end
- end_function
-
- procedure request_save
- local integer cur_grp cur_sbj cur_xrf
-
- if (name_required(current_object,0)) procedure_return
- if (name_required(current_object,1)) procedure_return
-
- get current_record of grp_data to cur_grp
- get current_record of sbj_data to cur_sbj
- get current_record of xrf_data to cur_xrf
- if ((cur_grp or cur_sbj) and not(cur_xrf)) set changed_state to true
-
- forward send request_save
- end_procedure
-
- procedure request_superfind integer mode
- local integer obj
-
- get server to obj
- set constrain_to_grp of obj to false
- set constrain_to_sbj of obj to false
- send rebuild_constraints to obj
-
- forward send request_superfind mode
-
- set constrain_to_grp of obj to true
- set constrain_to_sbj of obj to true
- send rebuild_constraints to obj
- end_procedure
- end_object
-
- object link is an entry_form link_status_img
- register_function link_value returns string
-
- set skip_state to true
- set location to 3 50 relative
-
- item_list
- entry_item (link_value(current_object))
- end_item_list
-
- function link_value returns string
- if xrf.recnum eq 0 begin
- delegate send shadow_edit_ctx_button true
- if (grp.recnum ne 0 and sbj.recnum ne 0) function_return NO_STRING
- else function_return EMPTY_STRING
- end
- else begin
- delegate send shadow_edit_ctx_button false
- function_return YES_STRING
- end
- end_function
- end_object
-
- object text is a help_maintenance_text_window
- set auto_clear_deo_state to false
- set location to 6 3 relative
- set size to 10 56
-
- assign_dbms_field sbj.sbj_text
-
- object left_zoom is a message help_editor_left_zoom_img
- set location to 0 -2 relative
- set focus_mode to no_activate
- end_object
-
- object right_zoom is a message help_editor_right_zoom_img
- set location to 0 57 relative
- set focus_mode to no_activate
- end_object
-
- object zoom_keys is a key_button help_editor_zoom_keys_img
- set location to 17 -2 relative
- set focus_mode to no_activate
-
- item_list
- on_item "<Alt+F9=Cancel zoom>" send shrink_text
- on_item F1_HELP_TEXT send help
- end_item_list
- end_object
-
- /help_editor_export_img
- ╔════════════════════════════════════════════╗
- ║____________________________________________║
- ║ ║
- ║ File to export text to: ║
- ║ ________________________________________ ║
- ║ ║
- ║ _______ ____________ _________ ║
- ╚════════════════════════════════════════════╝
- /*
- // <F2=OK> <Esc=Cancel> <F1=Help>
-
- sub_page help_editor_export_file_img from help_editor_export_img 2
- sub_page help_editor_export_btns_img from help_editor_export_img 3 4 5
-
- /help_editor_import_img
- ╔════════════════════════════════════════════╗
- ║____________________________________________║
- ║ ║
- ║ File to import text from: ║
- ║ ________________________________________ ║
- ║ ║
- ║ _______ ____________ _________ ║
- ╚════════════════════════════════════════════╝
- /*
- // <F2=OK> <Esc=Cancel> <F1=Help>
-
- sub_page help_editor_import_file_img from help_editor_import_img 2
- sub_page help_editor_import_btns_img from help_editor_import_img 3 4 5
-
- object export is an import_export_client help_editor_export_img help_editor_export_file_img help_editor_export_btns_img
- set location to 3 5 relative
- set title_name to "Export marked text"
- end_object
-
- set export_object to (export(current_object))
-
- object import is an import_export_client help_editor_import_img help_editor_import_file_img help_editor_import_btns_img
- set location to 3 5 relative
- set title_name to "Import text"
- end_object
-
- set import_object to (import(current_object))
-
- on_key key_alt+key_f1 send edit_contexts
- on_key key_alt+key_f2 send find_by_context
- on_key kcancel send activate to (action_bar(main.obj))
- on_key kexit_function send none
- on_key kzoom send toggle_zoom
-
- procedure find_by_context
- local integer flag
-
- get zoom_state to flag
- if not flag delegate send find_by_context
- end_procedure
-
- procedure edit_contexts
- local integer flag
-
- get zoom_state to flag
- if not flag delegate send edit_contexts
- end_procedure
-
- procedure switch
- local integer flag
-
- get zoom_state to flag
- if not flag forward send switch
- end_procedure
-
- procedure switch_back
- local integer flag
-
- get zoom_state to flag
- if not flag forward send switch_back
- end_procedure
-
- procedure prompt
- local integer flag
-
- get zoom_state to flag
- if not flag send popup to (sbj_prompt(main.obj))
- end_procedure
-
- procedure request_cancel
- local integer flag
-
- forward send request_cancel
- get zoom_state to flag
- if flag send shrink_text
- end_procedure
-
- procedure request_clear
- send request_clear_all
- end_procedure
-
- procedure request_clear_all
- local integer flag
-
- forward send request_clear_all
- get zoom_state to flag
- if flag send shrink_text
- end_procedure
-
- procedure request_delete
- local integer obj
-
- indicate err false
- forward send request_delete
- [not err] get server to obj
- [not err] send clear to obj
- end_procedure
-
- procedure request_save
- local integer cur_grp cur_sbj cur_xrf
-
- if (name_required(topic(parent(current_object)),0)) ;
- procedure_return
- if (name_required(topic(parent(current_object)),1)) ;
- procedure_return
-
- get current_record of grp_data to cur_grp
- get current_record of sbj_data to cur_sbj
- get current_record of xrf_data to cur_xrf
- if ((cur_grp or cur_sbj) and not(cur_xrf)) ;
- set changed_state to true
-
- forward send request_save
- end_procedure
-
- procedure toggle_zoom
- local integer flag
-
- get zoom_state to flag
- if not flag send zoom_text
- else send shrink_text
- end_procedure
-
- procedure zoom_text
- local integer obj
-
- set location to 1 3 relative
- set size to 17 56
-
- move (left_zoom(current_object)) to obj
- set focus_mode of obj to nonfocusable
- send add_focus to obj current_object
- move (right_zoom(current_object)) to obj
- set focus_mode of obj to nonfocusable
- send add_focus to obj current_object
- move (zoom_keys(current_object)) to obj
- set focus_mode of obj to pointer_only
- send add_focus to obj current_object
- get focus of desktop to obj
- if obj ne current_object send activate
-
- set zoom_state to true
- end_procedure
-
- procedure shrink_text
- local integer obj
-
- move (left_zoom(current_object)) to obj
- send deactivate to obj
- set focus_mode of obj to no_activate
- move (right_zoom(current_object)) to obj
- send deactivate to obj
- set focus_mode of obj to no_activate
- move (zoom_keys(current_object)) to obj
- send deactivate to obj
- set focus_mode of obj to no_activate
-
- set size to 10 56
- set location to 6 3 relative
-
- set zoom_state to false
- end_procedure
- end_object // text
-
- object keys is a key_button help_editor_keys_img
- set location to 17 2 relative
-
- item_list
- on_item "<Alt+F1=Context assignments>" send edit_contexts
- on_item "<Alt+F2=Find by context>" send find_by_context
- on_item F4_PROMPT_TEXT send prompt
- on_item "<Alt+F9=Zoom text>" send zoom_text_area
- on_item F1_HELP_TEXT send help
- end_item_list
- end_object
-
- /find_ctx_img
- ╔═════════════════════════════════════════════════════════════╗
- ║_____________________________________________________________║
- ║ ║
- ║ Application name: _______________ ║
- ║ Module name: _______________ ║
- ║ Help name: ________________________________________ ║
- ║ ║
- ║ _______ __________ __________________ ______________ ║
- ║ _________ ____________ _________ ║
- ╚═════════════════════════════════════════════════════════════╝
- /*
- // <F2=OK> <F5=Clear> <F7=Find previous> <F8=Find next>
- // <F9=Find> <Esc=Cancel> <F1=Help>
-
- sub_page find_ctx_form_img from find_ctx_img 2 3 4
- sub_page find_ctx_btns_img from find_ctx_img 5 6 7 8 9 10 11
-
- object find_ctx is a client find_ctx_img
- set block_mouse_state to true
- set location to 7 0 relative
- set popup_state to true
- set scope_state to true
-
- set center_state item 0 to true
- set value item 0 to "Find Help by Context"
-
- object ctx_form is an entry_form find_ctx_form_img
- item_list
- entry_item ctx.app_name
- entry_item ctx.mod_name
- entry_item ctx.hlp_name { autofind }
- end_item_list
-
- on_key kbegin_of_data send none
- on_key kcancel send request_cancel_area
- on_key kclear_all send none
- on_key kdelete_record send none
- on_key kend_of_data send none
- on_key ksave_record send request_ok
- on_key ksuper_find send none
- on_key ksuper_find_next send none
- on_key ksuper_find_previous send none
- end_object
-
- object keys is a button find_ctx_btns_img
- item_list
- on_item F2_OK_TEXT send request_ok
- on_item "<F5=Clear>" send request_clear
- on_item "<F7=Find previous>" send find_previous
- on_item "<F8=Find next>" send find_next
- on_item "<F9=Find>" send find_ge
- on_item ESC_CANCEL_TEXT send request_cancel_area
- on_item F1_HELP_TEXT send help
- end_item_list
-
- on_key ksave_record send request_ok
- on_key kclear send request_clear
- on_key kfind_previous send find_previous
- on_key kfind_next send find_next
- on_key kfind send find_ge
- on_key kcancel send request_cancel_area
- end_object
-
- procedure activating
- delegate send save_main_buffers
- forward send activating
- end_procedure
-
- procedure find_previous
- send find_previous to (ctx_form(current_object))
- end_procedure
-
- procedure find_next
- send find_next to (ctx_form(current_object))
- end_procedure
-
- procedure find_ge
- send find_ge to (ctx_form(current_object))
- end_procedure
-
- procedure request_cancel_area
- delegate send reset_main_buffers
- send request_cancel
- end_procedure
-
- procedure request_cancel
- send deactivate_area
- clear ctx
- end_procedure
-
- procedure request_clear
- local integer obj
-
- move (ctx_form(current_object)) to obj
- send request_clear to obj
- send activate to obj
- set current_item of obj to 0
- end_procedure
-
- procedure request_ok
- clear ctx
- send entry_update to (ctx_form(current_object)) ctx.file_number true
- find eq ctx.hlp_name
-
- if [found] begin
- send find_by_recnum to xrf_data xrf.file_number ctx.xrf_recnum
- send request_cancel
- end
- else error 25 "CTX"
- end_procedure
- end_object // find_ctx
-
- /contexts_img
- ╔══════════════════════════════════════════════════════════════════════════════╗
- ║______________________________________________________________________________║
- ║ ║
- ║ Application name Module name Help name ║
- ║ _______________ _______________ ________________________________________ ║
- ║ _______________ _______________ ________________________________________ ║
- ║ _______________ _______________ ________________________________________ ║
- ║ _______________ _______________ ________________________________________ ║
- ║ _______________ _______________ ________________________________________ ║
- ║ ║
- ║ _________ _________________ ║
- ║ ______________ ___________ _________ ║
- ╚══════════════════════════════════════════════════════════════════════════════╝
- /*
- // <F2=Save> <Shift+F2=Delete>
- // <F5=Clear/Add> <Esc=Close> <F1=Help>
-
- sub_page contexts_list_img from contexts_img horizontal 2 15
- sub_page contexts_btns_img from contexts_img 17 18 19 20 21
-
- object contexts is a client contexts_img
- set block_mouse_state to true
- set location to 7 -9 relative
- set popup_state to true
- set scope_state to true
-
- set center_state item 0 to true
- set value item 0 to "Help Contexts"
-
- object ctx_list is a ctx_table contexts_list_img main_file ctx by index.2 ;
- using (ctx_data(xrf_data.obj))
-
- set wrap_state to true
-
- begin_row
- entry_item ctx.app_name
- entry_item ctx.mod_name
- entry_item ctx.hlp_name
- end_row
- end_object // ctx_list
-
- object keys is a key_button contexts_btns_img
- item_list
- on_item "<F2=Save>" send request_save
- on_item "<Shift+F2=Delete>" send request_delete
- on_item "<F5=Clear/Add>" send request_clear
- on_item "<Esc=Close>" send request_cancel
- on_item F1_HELP_TEXT send help
- end_item_list
- end_object
- end_object // contexts
-
- procedure shadow_edit_ctx_button integer flag
- set shadow_state of (keys(current_object)) item 0 to flag
- end_procedure
-
- procedure find_by_context
- send popup to (find_ctx(current_object))
- end_procedure
-
- function verify_xrf_delete returns integer
- local integer ret_val
-
- if not status xrf begin
- error 71 "XRF"
- function_return 1
- end
-
- delegate get verify_delete_xrf "Link" "Context" to ret_val
- [not err] if ret_val indicate err true
- function_return ret_val
- end_function
-
- procedure release_focus
- local integer obj
-
- forward send release_focus
- close grp
- close sbj
- close xrf
- close ctx
- move EMPTY_STRING to current_grp
- move EMPTY_STRING to current_sbj
- move EMPTY_STRING to current_xrf
- move EMPTY_STRING to current_ctx
- move EMPTY_STRING to current_pth
-
- delegate send no_filenames
- end_procedure
-
- procedure request_clear_all
- local integer obj
-
- move (topic(current_object)) to obj
- send request_clear_all to obj
- set current_item of obj to 0
- end_procedure
-
- procedure edit_contexts
- local integer flag
-
- get shadow_state of (keys(current_object)) item 0 to flag
- if not flag send popup to (contexts(current_object))
- end_procedure
-
- procedure zoom_text_area
- send zoom_text to (text(current_object))
- end_procedure
- end_object // help_editor
-
- /main_status_bar_img
- Files: ________ ________ ________ ________│Path: _______________________________
- /*
-
- object status_bar is a message main_status_bar_img
- set focus_mode to nonfocusable
- set location to 20 0 relative
- set object_color to ;
- (hi(object_color(action_bar(main.obj)))) (low(object_color(action_bar(main.obj))))
- end_object
-
- /verify_del_img
- ╔═══════════════════════════════════════════════════════════╗
- ║___________________________________________________________║
- ║ ║
- ║ ║
- ║ ║
- ║ ║
- ║ ║
- ║ ║
- ╚═══════════════════════════════════════════════════════════╝
- /verify_del_btn_img
- ____ ________ ______
- /*
- // <OK> <Cancel> <Help>
-
- object verify_del is a client verify_del_img
- set block_mouse_state to true
- set location to 6 9 relative
- set popup_state to true
- set scope_state to true
-
- set center_state item 0 to true
- set value item 0 to "Verify deletion"
-
- object text is an edit
- set focus_mode to nonfocusable
- set location to 3 2 relative
- set object_color to (hi(object_color(parent(current_object)))) ;
- (low(object_color(parent(current_object))))
- set size to 2 56
- set scroll_bar_visible_state to false
- end_object
-
- object buttons is a button verify_del_btn_img
- set location to 6 1 relative
-
- item_list
- on_item '<OK>' send ok
- on_item '<Cancel>' send cancel
- on_item '<Help>' send help
- end_item_list
- end_object
-
- on_key kcancel send stop_ui
- end_object // verify_del
-
- /grp_prompt_img
- ╔══════════════════════════════════════════════╗
- ║______________________________________________║
- ║ ║
- ║ ║
- ║ ║
- ║ ║
- ║ ║
- ║ ║
- ║ ║
- ║ ║
- ║ ║
- ║ ║
- ║ ║
- ╚══════════════════════════════════════════════╝
- /grp_prompt_list_img
- _________________________________
- _________________________________
- _________________________________
- _________________________________
- _________________________________
- _________________________________
- _________________________________
- _________________________________
- /grp_prompt_btn_img
- ___________ ____________ _________
- /*
- // <F4=Prompt> <Esc=Cancel> <F1=Help>
-
- object grp_prompt is a help_maintenance_prompt_client grp_prompt_img
- set location to 3 16 relative
-
- set center_state item 0 to true
- set value item 0 to "Groups"
-
- object list is a help_maintenance_selection_list grp_prompt_list_img ;
- using grp_prompt_data main_file grp by index.1
-
- set export_server to grp_data.obj
- set location to 3 7 relative
-
- begin_row
- entry_item grp.grp_name
- end_row
-
- on_key kcancel send request_cancel_area
- on_key kenter send request_ok
- on_key kexit_application send quit_help_maint
- on_key kprompt send prompt to (parent(current_object))
- end_object
-
- object buttons is a prompt_client_button grp_prompt_btn_img
- set location to 12 1 relative
- end_object
-
- procedure popup_for_xrf
- local integer obj
- local string txt
-
- move "Groups for " to txt
- append txt sbj.sbj_name
- trim txt to txt
- set value item 0 to txt // title
-
- set shadow_prompt_state of (buttons(current_object)) to true
-
- move (list(current_object)) to obj
- set export_server of obj to xrf_data.obj
- set main_file of obj to xrf.file_number
- set ordering of obj to index.2
- set server of obj to xrf_prompt_data.obj
- send scan_servers to obj
-
- set constrain_to_sbj of xrf_prompt_data to true
- send rebuild_constraints to xrf_prompt_data
-
- set focus_mode to focusable
- send activate
- end_procedure
-
- procedure popup
- send reset
- forward send popup
- end_procedure
-
- procedure prompt
- local integer flag obj
-
- get shadow_prompt_state of (buttons(current_object)) to flag
-
- get parent to obj
- if not flag send popup_for_xrf to (sbj_prompt(obj))
- end_procedure
-
- procedure request_cancel_area
- local integer obj flag
-
- move (list(current_object)) to obj
- send request_cancel to obj
-
- send cancel to obj
-
- get parent to obj
- get active_state of (sbj_prompt(obj)) to flag
- if flag send reset
-
- forward send request_cancel_area
- end_procedure
-
- procedure request_ok
- local integer obj flag
-
- send ok to (list(current_object))
- get parent to obj
- move (sbj_prompt(obj)) to obj
- get active_state of obj to flag
-
- if flag begin
- send reset
- send request_cancel to (list(obj))
- end
- end_procedure
-
- procedure reset
- local integer obj
-
- set value item 0 to "Groups" // title
-
- set shadow_prompt_state of (buttons(current_object)) to false
-
- move (list(current_object)) to obj
- set export_server of obj to grp_data.obj
- set main_file of obj to grp.file_number
- set ordering of obj to index.1
- set server of obj to grp_prompt_data.obj
- send scan_servers to obj
-
- set constrain_to_sbj of xrf_prompt_data to false
- end_procedure
-
- procedure quit_help_maint
- local integer foc
-
- send request_cancel_area
- get focus of desktop to foc
- send exit_application to foc
- end_procedure
- end_object // grp_prompt
-
- /sbj_prompt_img
- ╔═══════════════════════════════════════════════════════════╗
- ║___________________________________________________________║
- ║ ║
- ║ ┌──────────────────────────────────┐ ║
- ║ │ │ ║
- ║ │ │ ║
- ║ │ │ ║
- ║ │ │ ║
- ║ │ │ ║
- ║ │ │ ║
- ║ │ │ ║
- ║ └──────────────────────────────────┘ ║
- ║┌─────────────────────────────────────────────────────────┐║
- ║│ │║
- ║│ │║
- ║│ │║
- ║└─────────────────────────────────────────────────────────┘║
- ║ ║
- ║ ║
- ╚═══════════════════════════════════════════════════════════╝
- /sbj_prompt_list_img
- _________________________________
- _________________________________
- _________________________________
- _________________________________
- _________________________________
- _________________________________
- _________________________________
- /sbj_prompt_btn_img
- ___________ ____________ _________
- /*
- // <F4=Prompt> <Esc=Cancel> <F1=Help>
-
- object sbj_prompt is a help_maintenance_prompt_client sbj_prompt_img
- set location to 0 10 relative
-
- set center_state item 0 to true
- set value item 0 to "Subjects"
-
- object list is a help_maintenance_selection_list sbj_prompt_list_img ;
- using sbj_prompt_data main_file sbj by index.1
-
- set export_server to sbj_data.obj
- set location to 4 14 relative
-
- begin_row
- entry_item sbj.sbj_name
- end_row
-
- object text is a help_maintenance_text_window
- set location to 9 -12 relative
- set focus_mode to nonfocusable
- set read_only_state to true
- set size to 3 56
-
- assign_dbms_field sbj.sbj_text
- end_object
-
- on_key kcancel send request_cancel_area
- on_key kenter send request_ok
- on_key kexit_application send quit_help_maint
- on_key kprompt send prompt to (parent(current_object))
-
- procedure find_record integer rec
- forward send find_record rec
- send entry_display to (text(current_object)) 0 0
- end_procedure
-
- procedure beginning_of_data
- forward send beginning_of_data
- send entry_display to (text(current_object)) 0 0
- end_procedure
-
- procedure end_of_data
- forward send end_of_data
- send read_by_recnum to (server(current_object)) (main_file(current_object)) (current_record(current_object))
- send entry_display to (text(current_object)) 0 0
- end_procedure
- end_object // list
-
- object buttons is a prompt_client_button sbj_prompt_btn_img
- set location to 18 1 relative
- end_object
-
- procedure popup_for_xrf
- local integer obj
- local string txt
-
- move "Subjects for " to txt
- append txt grp.grp_name
- trim txt to txt
- set value item 0 to txt // title
-
- set shadow_prompt_state of (buttons(current_object)) to true
-
- move (list(current_object)) to obj
- set export_server of obj to xrf_data.obj
- set main_file of obj to xrf.file_number
- set ordering of obj to index.1
- set server of obj to xrf_prompt_data.obj
- send scan_servers to obj
-
- set constrain_to_grp of xrf_prompt_data to true
- send rebuild_constraints to xrf_prompt_data
-
- set focus_mode to focusable
- send activate
- end_procedure
-
- procedure popup
- send reset
- forward send popup
- end_procedure
-
- procedure prompt
- local integer flag obj
-
- get shadow_prompt_state of (buttons(current_object)) to flag
- get parent to obj
- if not flag send popup_for_xrf to (grp_prompt(obj))
- end_procedure
-
- procedure request_cancel_area
- local integer obj flag
-
- move (list(current_object)) to obj
- send request_cancel to obj
-
- send cancel to obj
-
- get parent to obj
- get active_state of (grp_prompt(obj)) to flag
- if flag send reset
-
- forward send request_cancel_area
- end_procedure
-
- procedure request_ok
- local integer obj flag
-
- send ok to (list(current_object))
- get parent to obj
- move (grp_prompt(obj)) to obj
- get active_state of obj to flag
-
- if flag begin
- send reset
- send request_cancel to (list(obj))
- end
- end_procedure
-
- procedure reset
- local integer obj
-
- set value item 0 to "Subjects" // title
-
- set shadow_prompt_state of (buttons(current_object)) to false
-
- move (list(current_object)) to obj
-
- set export_server of obj to sbj_data.obj
- set main_file of obj to sbj.file_number
- set ordering of obj to index.1
- set server of obj to sbj_prompt_data.obj
- send scan_servers to obj
-
- set constrain_to_grp of xrf_prompt_data to false
- end_procedure
-
- procedure quit_help_maint
- local integer obj
-
- send request_cancel_area
- get focus of desktop to obj
- send exit_application to obj
- end_procedure
- end_object // sbj_prompt
-
- procedure show_current_file integer hfil string hname
- local integer obj
-
- move (status_bar(current_object)) to obj
- if hfil eq grp.file_number set value of obj item 0 to hname
- if hfil eq sbj.file_number set value of obj item 1 to hname
- if hfil eq xrf.file_number set value of obj item 2 to hname
- if hfil eq ctx.file_number set value of obj item 3 to hname
- if hfil eq 0 set value of obj item 4 to hname // pathname
- end_procedure
-
- procedure no_filenames
- local integer obj
-
- move (status_bar(current_object)) to obj
- set value of obj item 0 to NONE_STRING
- set value of obj item 1 to EMPTY_STRING
- set value of obj item 2 to EMPTY_STRING
- set value of obj item 3 to EMPTY_STRING
- set value of obj item 4 to NONE_STRING
- end_procedure
-
- procedure save_main_buffers
- set current_grp_record to grp.recnum
- set current_sbj_record to sbj.recnum
- set current_xrf_record to xrf.recnum
- end_procedure
-
- procedure reset_main_buffers
- clear grp
- get current_grp_record to grp.recnum
- if grp.recnum ne 0 begin
- find eq grp.recnum
- [not found] send clear to grp_data
- end
-
- clear sbj
- get current_sbj_record to sbj.recnum
- if sbj.recnum ne 0 begin
- find eq sbj.recnum
- [not found] send clear to sbj_data
- end
-
- clear xrf
- get current_xrf_record to xrf.recnum
- if xrf.recnum ne 0 begin
- find eq xrf.recnum
- [not found] send clear to xrf_data
- end
- end_procedure
-
- procedure new_help_files
- local integer obj
-
- get cb_return_value to current_grp
- get cb_return_value to current_sbj
- get cb_return_value to current_xrf
- get cb_return_value to current_ctx
- get cb_return_value to current_pth
- if current_pth eq EMPTY_REPL_STRING move EMPTY_STRING to current_pth
-
- send show_current_file grp.file_number current_grp
- send show_current_file sbj.file_number current_sbj
- send show_current_file xrf.file_number current_xrf
- send show_current_file ctx.file_number current_ctx
- send show_current_file 0 current_pth
- end_procedure
-
- function call_sub_help string prog_name string opt integer ret_files_state ;
- returns string
- local string reply curgrp cursbj curxrf curctx curpth ch_str
-
- trim current_grp to curgrp
- if curgrp le EMPTY_STRING move EMPTY_REPL_STRING to curgrp
- trim current_sbj to cursbj
- if cursbj le EMPTY_STRING move EMPTY_REPL_STRING to cursbj
- trim current_xrf to curxrf
- if curxrf le EMPTY_STRING move EMPTY_REPL_STRING to curxrf
- trim current_ctx to curctx
- if curctx le EMPTY_STRING move EMPTY_REPL_STRING to curctx
- trim current_pth to curpth
- if curpth le EMPTY_STRING move EMPTY_REPL_STRING to curpth
-
- move prog_name to ch_str
- append ch_str SPACE_STRING opt SPACE_STRING curgrp SPACE_STRING cursbj
- append ch_str SPACE_STRING curxrf SPACE_STRING curctx SPACE_STRING curpth
-
- chain wait ch_str export_files
- send refresh_screen to desktop // in case screen was corrupted
-
- get cb_return_value to reply
- if reply eq SUCCESS_REPLY if ret_files_state send new_help_files
-
- function_return reply
- end_function
-
- procedure new
- local string reply
-
- get call_sub_help SECONDARY_DFHELP_PROGRAM_A NEW_FILE_OPTION true to reply
- if reply eq ABORT_REPLY send exit_application
- else if reply eq SUCCESS_REPLY begin
- send request_clear_all to (help_editor(current_object))
- send edit_help_data
- end
- end_procedure
-
- procedure open
- local string reply
-
- get call_sub_help SECONDARY_DFHELP_PROGRAM_A OPEN_FILE_OPTION true to reply
- if reply eq ABORT_REPLY send exit_application
- else if reply eq SUCCESS_REPLY begin
- send request_clear_all to (help_editor(current_object))
- send edit_help_data
- end
- end_procedure
-
- procedure exit_program returns integer
- send deactivate
- procedure_return 1
- end_procedure
-
- procedure group
- local string reply
-
- send save_main_buffers
- get call_sub_help SECONDARY_DFHELP_PROGRAM_B GRP_MAINT_OPTION false to reply
- send reset_main_buffers
- end_procedure
-
- procedure subject
- local string reply
-
- send save_main_buffers
- get call_sub_help SECONDARY_DFHELP_PROGRAM_B SBJ_MAINT_OPTION false to reply
- send reset_main_buffers
- end_procedure
-
- procedure cross_reference
- local string reply
-
- send save_main_buffers
- get call_sub_help SECONDARY_DFHELP_PROGRAM_B XRF_MAINT_OPTION false to reply
- send reset_main_buffers
- end_procedure
-
- procedure context
- local string reply
-
- send save_main_buffers
- get call_sub_help SECONDARY_DFHELP_PROGRAM_C CTX_MAINT_OPTION false to reply
- if reply eq ABORT_REPLY send exit_application
- else send reset_main_buffers
- end_procedure
-
- procedure cleanup
- local string reply
-
- send save_main_buffers
- get call_sub_help SECONDARY_DFHELP_PROGRAM_C CLN_MAINT_OPTION false to reply
- if reply eq ABORT_REPLY send exit_application
- else send reset_main_buffers
- end_procedure
-
- procedure import
- local string reply
-
- send save_main_buffers
- get call_sub_help SECONDARY_DFHELP_PROGRAM_A IMP_MAINT_OPTION false to reply
- if reply eq ABORT_REPLY send exit_application
- else send reset_main_buffers
- end_procedure
-
- procedure erase_data
- local string reply
-
- get call_sub_help SECONDARY_DFHELP_PROGRAM_A ERS_MAINT_OPTION false to reply
- if reply eq ABORT_REPLY send exit_application
- else if reply eq SUCCESS_REPLY send request_clear_all to (help_editor(current_object))
- end_procedure
-
- procedure reorder_data
- local string reply
-
- get call_sub_help SECONDARY_DFHELP_PROGRAM_C REORD_MAINT_OPTION false to reply
- if reply eq ABORT_REPLY send exit_application
- else if reply eq SUCCESS_REPLY send request_clear_all to (help_editor(current_object))
- end_procedure
-
- procedure edit_help_data
- local integer obj flag
-
- move (help_editor(current_object)) to obj
- get active_state of obj to flag
- if not flag send popup to obj
- broadcast recursive send rebuild_constraints to xrf_data
- end_procedure
-
- function verify_delete_xrf string filename string related returns integer
- local string txt
- local integer result obj tobj
-
- move (verify_del(current_object)) to obj
- move (text(obj)) to tobj
-
- move 'Delete the ' to txt
- append txt filename ' record and ' related ' records that relate to it?'
- send delete_data to tobj
- send insert to tobj txt
-
- ui_accept obj to result
-
- if result eq msg_ok function_return 0
- else function_return 1
- // ret_val: 0 means delete, 1 means cancel
- end_function
-
- send no_filenames // initialize status_bar
- end_object // main
-
- /about_img
- ╔════════════════════════════════════════╗
- ║ ║
- ║________________________________________║
- ║ ║
- ║ Version 1.0b ║
- ║ ║
- ║ Copyright 1987-1992 Data Access Corp ║
- ║ Miami FL, USA - All rights reserved ║
- ║ ║
- ║ Memory: __________ bytes ║
- ║ ║
- ║ ____ ______ ║
- ║ ║
- ╚════════════════════════════════════════╝
- /*
- // <OK> <Help>
-
- sub_page about_btn_img from about_img 3 4
-
- object about is a client about_img
- set block_mouse_state to true
- set location to 6 20 relative
- set popup_state to true
- set scope_state to true
-
- set center_state item 0 to true
- set value item 0 to "DataFlex Help Maintenance Utility"
-
- object buttons is a button about_btn_img
- item_list
- on_item "<OK>" send deactivate to (parent(current_object))
- on_item "<Help>" send help
- end_item_list
- end_object
- end_object
-
- procedure about for desktop
- local integer mem
-
- memory mem
- set value of about item 1 to mem
- send popup to about
- end_procedure
-
- procedure open_on_cmd_arg for desktop
- local string prfx cb_reply ch_str
-
- cmdline prfx
- if prfx gt EMPTY_STRING begin
- uppercase prfx
-
- fix_up
-
- move SECONDARY_DFHELP_PROGRAM_A to ch_str
- append ch_str SPACE_STRING PATH_OPTION SPACE_STRING prfx
- trim ch_str to ch_str
-
- chain wait ch_str export_files
- send refresh_screen to desktop // in case screen was corrupted
-
- get cb_return_value to cb_reply
- if cb_reply eq ABORT_REPLY send exit_application
- else if cb_reply eq SUCCESS_REPLY begin
- send new_help_files to main
- send request_clear_all to (help_editor(main.obj))
- send edit_help_data to main
- end
- end
- end_procedure
-
- //////////////////////////////////
- ////////////////////////////////// main logic
- //////////////////////////////////
-
- send add_focus to title desktop
- send activate to main
-
- send open_on_cmd_arg // use optional path/file_prefix passed on cmd line
-
- start_ui
-
- abort
-