4GYICRO5RGEO3W63GQ46SUFELX7G2XU3CH2MCIRV4WTWBU6HCZBQC RCA6YTTP4UPHWHPD556KAIXOROWQK6G6ZTNQNC3FPY3XGPZBK7GQC LRDM35CEK3OHXOTB7TEFJRL7P6PQWO5ZG3F2BVA7DIDFHBPJQ7KAC 36Z442IVPXHZ7D2QI26YLN3TDDEMDRQ2GKBYQAD6NUHQZVCCY4VAC 2CTN2IEF4ZCVZQORAEBXAUDANF6NYZA24GQ5PXK2WUDWYU5UV25QC BJ5X5O4ACBBJ56LRBBSTCW6IBQP4HAEOOOPNH3SKTA4F66YTOIDAC R5QXEHUIZLELJGGCZAE7ATNS3CLRJ7JFRENMGH4XXH24C5WABZDQC on.load_settings = function(settings)App_name = load_manifest()print('app name', App_name, settings)-- backstop any default settings for this app, and stash everything to a global for on.save_settingsif settings == nil thenSettings = {}elseSettings = settingsendif Settings[App_name] == nil thenSettings[App_name] = {}Settings[App_name].viewport = ViewportSettings[App_name].definitions = get_default_map()endViewport = Settings[App_name].viewportDefinitions = Settings[App_name].definitionslocal names = {}for name, _ in pairs(Definitions) dotable.insert(names, name)endlocal defs = get_multiple_definitions_from_app(names)for name, def_editor in pairs(Definitions) doprint('definition:', name)if def_editor.type == nil thendef_editor.type = 'text'endif def_editor.bg == nil thenprint('initializing bg')def_editor.bg = definition_background_color(name)endif def_editor.width == nil thenprint('initializing width')def_editor.width = 600endprint('at', def_editor.x, def_editor.y)if defs[name] thendef_editor.data = load_from_iterator(defs[name]:gmatch("[^\r\n]+"))else-- app doesn't know about this definition-- just delete it from the driver for nowprint('deleting', name)Definitions[name] = nilendendend
{"Surface":422,"on.draw":932,"Viewport":604,"load_definition":854,"vy":546,"undo_zoom_out":921,"Manifest_navigator":495,"draw_run_time_error":808,"scale":712,"Failing_test_definition_background_color":925,"on.mouse_release":836,"on.save_settings":742,"on.update":900,"on_text":539,"on.keychord_press":919,"on.mouse_press":916,"draw_test_failure_indicator":935,"Page":475,"table_and_array_both_empty":689,"on.initialize":807,"A":831,"load_manifest":694,"get_manifest":768,"B":830,"on.key_release":720,"surface_bounds":814,"Definitions":503,"new_definition":848,"mouse_cursor":558,"Spawn_point":822,"Mouse_cursor":559,"from_viewport":823,"interpolate_viewport":843,"set_mouse_cursor":562,"add_thick_line":400,"box_height":680,"copy_shape":396,"compute_layout":385,"maybe_update_key_in_definitions":529,"Menu_highlight_color":614,"draw_menu_bar":861,"add_hotkey_to_menu":616,"Test_definition_background_color":858,"definition_background_color":859,"tick_spec":660,"approximate":579,"order_of_magnitude":573,"font":353,"reset_manifest_navigator":772,"Cursor_node":172,"on":1,"load_from_iterator":670,"draw_manifest_navigator":677,"on_handle":547,"approximate_up":658,"snapshot_canvas":913,"update_editor_box":711,"Save_viewport":865,"manifest_navigator_up":628,"Ticks_font":669,"manifest_navigator_down":635,"initialize_editor":678,"zoom_out":908,"delete_definition":673,"Zoomed_out":869,"move_candidate_to_front_of_manifest":632,"schema1_of_y":667,"keychord_press_on_manifest_navigator":765,"draw_ticks":862,"text_input_on_manifest_navigator":634,"zoom_in":920,"Animating":842,"y_of_schema1":364,"get_definition_from_app":784,"manifest_index":637,"manifest_coord":636,"manifest_navigator_candidates":638,"sy":469,"draw_cursor":639,"add_def_to_menu":640,"vx":545,"sx":544,"fw_parent":939,"on.text_input":855,"Menu_background_color":611,"get_default_map":937,"Menu_border_color":612,"on.code_change":924,"Menu_command_color":613,"Definition_background_color":849,"on.load_settings":940,"survey_animation":906,"line_height":365,"Num_animation_frames":840,"initialize_manifest_navigator":773,"on.code_submit":927,"animate_next":914,"copy_viewport":866,"Manifest":769,"animate_next_frame":915,"get_multiple_definitions_from_app":783,"num_lines_for_manifest_navigator":676,"fw_app":"driver","draw_load_time_error":929,"wait_for_response":781}
on.load_settings = function(settings)App_name = load_manifest()print('app name', App_name, settings)if settings == nil then return endSettings = settings -- stash all settings into a global for on.save_settingsif settings[App_name] == nil thensettings[App_name] = get_default_map()returnendViewport = settings[App_name].viewportDefinitions = settings[App_name].definitionslocal names = {}for name, _ in pairs(Definitions) dotable.insert(names, name)endlocal defs = get_multiple_definitions_from_app(names)for name, def_editor in pairs(Definitions) doif defs[name] thendef_editor.data = load_from_iterator(defs[name]:gmatch("[^\r\n]+"))else-- app doesn't know about this definition-- just delete it from the driver for nowprint('deleting', name)Definitions[name] = nilendendend
{"Surface":422,"on.draw":932,"Viewport":604,"load_definition":854,"vy":546,"undo_zoom_out":921,"Manifest_navigator":495,"draw_run_time_error":808,"scale":712,"Failing_test_definition_background_color":925,"on.mouse_release":836,"on.save_settings":742,"on.update":900,"on_text":539,"on.keychord_press":919,"on.mouse_press":916,"draw_test_failure_indicator":935,"Page":475,"table_and_array_both_empty":689,"on.initialize":807,"A":831,"load_manifest":694,"get_manifest":768,"B":830,"on.key_release":720,"surface_bounds":814,"Definitions":503,"new_definition":848,"mouse_cursor":558,"Spawn_point":822,"Mouse_cursor":559,"from_viewport":823,"interpolate_viewport":843,"set_mouse_cursor":562,"add_thick_line":400,"box_height":680,"copy_shape":396,"compute_layout":385,"maybe_update_key_in_definitions":529,"Menu_highlight_color":614,"draw_menu_bar":861,"add_hotkey_to_menu":616,"Test_definition_background_color":858,"definition_background_color":859,"tick_spec":660,"approximate":579,"order_of_magnitude":573,"font":353,"reset_manifest_navigator":772,"Cursor_node":172,"on":1,"load_from_iterator":670,"draw_manifest_navigator":677,"on_handle":547,"approximate_up":658,"snapshot_canvas":913,"update_editor_box":711,"Save_viewport":865,"manifest_navigator_up":628,"Ticks_font":669,"manifest_navigator_down":635,"initialize_editor":678,"zoom_out":908,"delete_definition":673,"Zoomed_out":869,"move_candidate_to_front_of_manifest":632,"schema1_of_y":667,"keychord_press_on_manifest_navigator":765,"draw_ticks":862,"text_input_on_manifest_navigator":634,"zoom_in":920,"Animating":842,"y_of_schema1":364,"get_definition_from_app":784,"manifest_index":637,"manifest_coord":636,"manifest_navigator_candidates":638,"sy":469,"draw_cursor":639,"add_def_to_menu":640,"vx":545,"sx":544,"fw_parent":938,"on.text_input":855,"Menu_background_color":611,"get_default_map":937,"Menu_border_color":612,"on.code_change":924,"Menu_command_color":613,"Definition_background_color":849,"on.load_settings":939,"survey_animation":906,"line_height":365,"Num_animation_frames":840,"initialize_manifest_navigator":773,"on.code_submit":927,"animate_next":914,"copy_viewport":866,"Manifest":769,"animate_next_frame":915,"get_multiple_definitions_from_app":783,"num_lines_for_manifest_navigator":676,"fw_app":"driver","draw_load_time_error":929,"wait_for_response":781}
on.load_settings = function(settings)App_name = load_manifest()print('app name', App_name, settings)if settings == nil then return endSettings = settings -- stash all settings into a global for on.save_settingsif settings[App_name] == nil thensettings[App_name] = get_default_map()returnendViewport = settings[App_name].viewportDefinitions = settings[App_name].definitionslocal names = {}for name, _ in pairs(Definitions) dotable.insert(names, name)endlocal defs = get_multiple_definitions_from_app(names)for name, def_editor in pairs(Definitions) doif defs[name] thendef_editor.data = load_from_iterator(defs[name]:gmatch("[^\r\n]+"))else-- app doesn't know about this definition-- just delete it from the driver for nowprint('deleting', name)Definitions[name] = nilendendend
{"undo_zoom_out":921,"approximate":579,"initialize_manifest_navigator":773,"update_editor_box":711,"get_multiple_definitions_from_app":783,"draw_load_time_error":929,"approximate_up":658,"draw_test_failure_indicator":935,"wait_for_response":781,"schema1_of_y":667,"Ticks_font":669,"Manifest_navigator":495,"y_of_schema1":364,"on.save_settings":742,"on.load_settings":938,"Manifest":769,"survey_animation":906,"load_manifest":694,"animate_next":914,"get_manifest":768,"on.code_submit":927,"animate_next_frame":915,"Definitions":503,"scale":712,"new_definition":848,"get_default_map":937,"delete_definition":673,"Menu_command_color":613,"Definition_background_color":849,"Test_definition_background_color":858,"add_thick_line":400,"definition_background_color":859,"copy_shape":396,"Num_animation_frames":840,"draw_run_time_error":808,"Surface":422,"on.code_change":924,"interpolate_viewport":843,"Menu_background_color":611,"Spawn_point":822,"Menu_border_color":612,"from_viewport":823,"Viewport":604,"snapshot_canvas":913,"Menu_highlight_color":614,"Save_viewport":865,"draw_menu_bar":861,"copy_viewport":866,"add_hotkey_to_menu":616,"fw_app":"driver","zoom_out":908,"draw_manifest_navigator":677,"on.mouse_release":836,"num_lines_for_manifest_navigator":676,"on.update":900,"table_and_array_both_empty":689,"on.keychord_press":919,"on_handle":547,"on.text_input":855,"draw_cursor":639,"Page":475,"on.initialize":807,"on_text":539,"A":831,"on.mouse_press":916,"fw_parent":937,"manifest_navigator_up":628,"B":830,"manifest_navigator_down":635,"sx":544,"vy":546,"vx":545,"zoom_in":920,"move_candidate_to_front_of_manifest":632,"Cursor_node":172,"keychord_press_on_manifest_navigator":765,"surface_bounds":814,"on.key_release":720,"sy":469,"get_definition_from_app":784,"manifest_coord":636,"load_from_iterator":670,"manifest_index":637,"maybe_update_key_in_definitions":529,"manifest_navigator_candidates":638,"reset_manifest_navigator":772,"mouse_cursor":558,"box_height":680,"Mouse_cursor":559,"compute_layout":385,"Failing_test_definition_background_color":925,"text_input_on_manifest_navigator":634,"set_mouse_cursor":562,"Animating":842,"draw_ticks":862,"on.draw":932,"font":353,"Zoomed_out":869,"line_height":365,"on":1,"add_def_to_menu":640,"load_definition":854,"initialize_editor":678,"order_of_magnitude":573,"tick_spec":660}
get_default_map = function()-- Suggest a map for one's own code.-- Mostly the driver manages its map of an app's code outside the app. However, an app can suggest a default map for people who haven't created one.live.send_to_app('DEFAULT_MAP')local responserepeatlove.timer.sleep(0.01)response = live.receive_from_app()until responselocal result = {}if #response == 0 thenreturn resultendreturn json.decode(response)end
{"undo_zoom_out":921,"approximate":579,"initialize_manifest_navigator":773,"update_editor_box":711,"get_multiple_definitions_from_app":783,"draw_load_time_error":929,"approximate_up":658,"draw_test_failure_indicator":935,"wait_for_response":781,"schema1_of_y":667,"Ticks_font":669,"Manifest_navigator":495,"y_of_schema1":364,"on.save_settings":742,"on.load_settings":782,"Manifest":769,"survey_animation":906,"load_manifest":694,"animate_next":914,"get_manifest":768,"on.code_submit":927,"animate_next_frame":915,"Definitions":503,"scale":712,"new_definition":848,"get_default_map":937,"delete_definition":673,"Menu_command_color":613,"Definition_background_color":849,"Test_definition_background_color":858,"add_thick_line":400,"definition_background_color":859,"copy_shape":396,"Num_animation_frames":840,"draw_run_time_error":808,"Surface":422,"on.code_change":924,"interpolate_viewport":843,"Menu_background_color":611,"Spawn_point":822,"Menu_border_color":612,"from_viewport":823,"Viewport":604,"snapshot_canvas":913,"Menu_highlight_color":614,"Save_viewport":865,"draw_menu_bar":861,"copy_viewport":866,"add_hotkey_to_menu":616,"fw_app":"driver","zoom_out":908,"draw_manifest_navigator":677,"on.mouse_release":836,"num_lines_for_manifest_navigator":676,"on.update":900,"table_and_array_both_empty":689,"on.keychord_press":919,"on_handle":547,"on.text_input":855,"draw_cursor":639,"Page":475,"on.initialize":807,"on_text":539,"A":831,"on.mouse_press":916,"fw_parent":936,"manifest_navigator_up":628,"B":830,"manifest_navigator_down":635,"sx":544,"vy":546,"vx":545,"zoom_in":920,"move_candidate_to_front_of_manifest":632,"Cursor_node":172,"keychord_press_on_manifest_navigator":765,"surface_bounds":814,"on.key_release":720,"sy":469,"get_definition_from_app":784,"manifest_coord":636,"load_from_iterator":670,"manifest_index":637,"maybe_update_key_in_definitions":529,"manifest_navigator_candidates":638,"reset_manifest_navigator":772,"mouse_cursor":558,"box_height":680,"Mouse_cursor":559,"compute_layout":385,"Failing_test_definition_background_color":925,"text_input_on_manifest_navigator":634,"set_mouse_cursor":562,"Animating":842,"draw_ticks":862,"on.draw":932,"font":353,"Zoomed_out":869,"line_height":365,"on":1,"add_def_to_menu":640,"load_definition":854,"initialize_editor":678,"order_of_magnitude":573,"tick_spec":660}
get_default_map = function()-- Suggest a map for one's own code.-- Mostly the driver manages its map of an app's code outside the app. However, an app can suggest a default map for people who haven't created one.live.send_to_app('DEFAULT_MAP')local responserepeatlove.timer.sleep(0.01)response = live.receive_from_app()until responselocal result = {}if #response == 0 thenreturn resultendreturn json.decode(response)end
{"undo_zoom_out":921,"approximate":579,"initialize_manifest_navigator":773,"update_editor_box":711,"get_multiple_definitions_from_app":783,"draw_load_time_error":929,"approximate_up":658,"draw_test_failure_indicator":935,"wait_for_response":781,"schema1_of_y":667,"Ticks_font":669,"Manifest_navigator":495,"y_of_schema1":364,"on.save_settings":742,"on.load_settings":782,"Manifest":769,"survey_animation":906,"load_manifest":694,"animate_next":914,"get_manifest":768,"on.code_submit":927,"animate_next_frame":915,"Definitions":503,"scale":712,"new_definition":848,"get_default_map":936,"delete_definition":673,"Menu_command_color":613,"Definition_background_color":849,"Test_definition_background_color":858,"add_thick_line":400,"definition_background_color":859,"copy_shape":396,"Num_animation_frames":840,"draw_run_time_error":808,"Surface":422,"on.code_change":924,"interpolate_viewport":843,"Menu_background_color":611,"Spawn_point":822,"Menu_border_color":612,"from_viewport":823,"Viewport":604,"snapshot_canvas":913,"Menu_highlight_color":614,"Save_viewport":865,"draw_menu_bar":861,"copy_viewport":866,"add_hotkey_to_menu":616,"fw_app":"driver","zoom_out":908,"draw_manifest_navigator":677,"on.mouse_release":836,"num_lines_for_manifest_navigator":676,"on.update":900,"table_and_array_both_empty":689,"on.keychord_press":919,"on_handle":547,"on.text_input":855,"draw_cursor":639,"Page":475,"on.initialize":807,"on_text":539,"A":831,"on.mouse_press":916,"fw_parent":935,"manifest_navigator_up":628,"B":830,"manifest_navigator_down":635,"sx":544,"vy":546,"vx":545,"zoom_in":920,"move_candidate_to_front_of_manifest":632,"Cursor_node":172,"keychord_press_on_manifest_navigator":765,"surface_bounds":814,"on.key_release":720,"sy":469,"get_definition_from_app":784,"manifest_coord":636,"load_from_iterator":670,"manifest_index":637,"maybe_update_key_in_definitions":529,"manifest_navigator_candidates":638,"reset_manifest_navigator":772,"mouse_cursor":558,"box_height":680,"Mouse_cursor":559,"compute_layout":385,"Failing_test_definition_background_color":925,"text_input_on_manifest_navigator":634,"set_mouse_cursor":562,"Animating":842,"draw_ticks":862,"on.draw":932,"font":353,"Zoomed_out":869,"line_height":365,"on":1,"add_def_to_menu":640,"load_definition":854,"initialize_editor":678,"order_of_magnitude":573,"tick_spec":660}