BEQ7QB74QBYDIGVCQTI5BXZX4XPDEJSMLEGVMNMIXUDL672XP5BAC
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_settings
if settings == nil then
Settings = {}
else
Settings = settings
end
if Settings[App_name] == nil then
Settings[App_name] = {}
Settings[App_name].viewport = Viewport
Settings[App_name].definitions = get_default_map()
end
Viewport = Settings[App_name].viewport
Definitions = Settings[App_name].definitions
local names = {}
for name, _ in pairs(Definitions) do
table.insert(names, name)
end
local defs = get_multiple_definitions_from_app(names)
for name, def_editor in pairs(Definitions) do
if def_editor.type == nil then
def_editor.type = 'text'
end
if def_editor.bg == nil then
def_editor.bg = definition_background_color(name)
end
if def_editor.width == nil then
def_editor.width = 600
end
if defs[name] then
def_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 now
print('deleting', name)
Definitions[name] = nil
end
end
end
{"definition_background_color":1015,"Manifest_navigator":495,"add_def_to_menu":640,"y_of_schema1":364,"on.code_submit":947,"snapshot_canvas":913,"Save_viewport":865,"Cursor_node":172,"copy_viewport":866,"initialize_manifest_navigator":773,"zoom_out":908,"Zoomed_out":869,"line_height":365,"Menu_border_color":612,"wait_for_response":781,"zoom_in":920,"Menu_highlight_color":614,"fw_app":"driver","draw_menu_bar":861,"add_hotkey_to_menu":616,"draw_manifest_navigator":677,"load_definition":854,"add_thick_line":400,"reset_manifest_navigator":772,"copy_shape":396,"draw_run_time_error":808,"maybe_update_key_in_definitions":529,"survey_animation":1014,"on.text_input":855,"on.load_settings":1020,"tick_spec":998,"Menu_command_color":613,"Viewport":604,"new_definition":848,"Definitions":503,"animate_next_frame":915,"box_height":680,"compute_layout":385,"schema1_of_y":667,"get_multiple_definitions_from_app":1016,"on.code_change":924,"on":1,"on_handle":547,"get_manifest":768,"num_lines_for_manifest_navigator":676,"surface_bounds":814,"Page":475,"on_text":539,"font":353,"Ticks_font":669,"on.initialize":948,"Manifest":769,"A":1017,"sx":955,"Spawn_point":822,"undo_zoom_out":921,"from_viewport":823,"draw_cursor":639,"interpolate_viewport":843,"animate_next":914,"on.key_release":720,"on.mouse_press":916,"initialize_editor":678,"Menu_background_color":611,"table_and_array_both_empty":689,"Animating":842,"on.save_settings":742,"draw_test_failure_indicator":935,"Surface":422,"mouse_cursor":558,"iscale":953,"Mouse_cursor":559,"update_editor_box":711,"vx":545,"get_default_map":937,"set_mouse_cursor":562,"B":1018,"draw_ticks":997,"vy":956,"on.draw":986,"approximate_up":985,"load_from_iterator":670,"fw_parent":1019,"get_definition_from_app":784,"draw_load_time_error":929,"on.mouse_release":836,"order_of_magnitude":573,"on.update":945,"manifest_navigator_up":628,"on.keychord_press":919,"Num_animation_frames":840,"approximate":579,"Failing_test_definition_background_color":925,"delete_definition":673,"manifest_navigator_down":635,"move_candidate_to_front_of_manifest":632,"sy":954,"keychord_press_on_manifest_navigator":765,"load_manifest":694,"text_input_on_manifest_navigator":634,"Definition_background_color":849,"scale":712,"manifest_coord":636,"test_approximate_up":983,"manifest_index":637,"Test_definition_background_color":858,"manifest_navigator_candidates":638}
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_settings
if settings == nil then
Settings = {}
else
Settings = settings
end
if Settings[App_name] == nil then
Settings[App_name] = {}
Settings[App_name].viewport = Viewport
Settings[App_name].definitions = get_default_map()
end
Viewport = Settings[App_name].viewport
Definitions = Settings[App_name].definitions
local names = {}
for name, _ in pairs(Definitions) do
table.insert(names, name)
end
local defs = get_multiple_definitions_from_app(names)
for name, def_editor in pairs(Definitions) do
if def_editor.type == nil then
def_editor.type = 'text'
end
if def_editor.bg == nil then
def_editor.bg = definition_background_color(name)
end
if def_editor.width == nil then
def_editor.width = 600
end
if defs[name] then
def_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 now
print('deleting', name)
Definitions[name] = nil
end
end
end
{"definition_background_color":1015,"Manifest_navigator":495,"add_def_to_menu":640,"y_of_schema1":364,"on.code_submit":947,"snapshot_canvas":913,"Save_viewport":865,"Cursor_node":172,"copy_viewport":866,"initialize_manifest_navigator":773,"zoom_out":908,"Zoomed_out":869,"line_height":365,"Menu_border_color":612,"wait_for_response":781,"zoom_in":920,"Menu_highlight_color":614,"fw_app":"driver","draw_menu_bar":861,"add_hotkey_to_menu":616,"draw_manifest_navigator":677,"load_definition":854,"add_thick_line":400,"reset_manifest_navigator":772,"copy_shape":396,"draw_run_time_error":808,"maybe_update_key_in_definitions":529,"survey_animation":1014,"on.text_input":855,"on.load_settings":1019,"tick_spec":998,"Menu_command_color":613,"Viewport":604,"new_definition":848,"Definitions":503,"animate_next_frame":915,"box_height":680,"compute_layout":385,"schema1_of_y":667,"get_multiple_definitions_from_app":1016,"on.code_change":924,"on":1,"on_handle":547,"get_manifest":768,"num_lines_for_manifest_navigator":676,"surface_bounds":814,"Page":475,"on_text":539,"font":353,"Ticks_font":669,"on.initialize":948,"Manifest":769,"A":1017,"sx":955,"Spawn_point":822,"undo_zoom_out":921,"from_viewport":823,"draw_cursor":639,"interpolate_viewport":843,"animate_next":914,"on.key_release":720,"on.mouse_press":916,"initialize_editor":678,"Menu_background_color":611,"table_and_array_both_empty":689,"Animating":842,"on.save_settings":742,"draw_test_failure_indicator":935,"Surface":422,"mouse_cursor":558,"iscale":953,"Mouse_cursor":559,"update_editor_box":711,"vx":545,"get_default_map":937,"set_mouse_cursor":562,"B":1018,"draw_ticks":997,"vy":956,"on.draw":986,"approximate_up":985,"load_from_iterator":670,"fw_parent":1018,"get_definition_from_app":784,"draw_load_time_error":929,"on.mouse_release":836,"order_of_magnitude":573,"on.update":945,"manifest_navigator_up":628,"on.keychord_press":919,"Num_animation_frames":840,"approximate":579,"Failing_test_definition_background_color":925,"delete_definition":673,"manifest_navigator_down":635,"move_candidate_to_front_of_manifest":632,"sy":954,"keychord_press_on_manifest_navigator":765,"load_manifest":694,"text_input_on_manifest_navigator":634,"Definition_background_color":849,"scale":712,"manifest_coord":636,"test_approximate_up":983,"manifest_index":637,"Test_definition_background_color":858,"manifest_navigator_candidates":638}