scenario: press ctrl+n to create a new definition in an app without typing anything in it, switch to an existing definition hit f4
Before this commit the driver would crash.
Z6RIHI6QMDAVY4MDPS6Q6VLJMWT6XMSRPFFJB66LD3IICQQXZUMAC
on.code_submit = function(editor)
if not editor.load_time_error then
Manifest_navigator.reload = true
end
-- update definition backgrounds of failing tests
for name,node in pairs(Definitions) do
-- ignore temporary definitions with numeric indices; they haven't been saved yet
if type(name) == 'string' and starts_with(name, 'test_') then
if Client_app_test_failures[name] then
node.bg = Failing_test_definition_background_color
else
node.bg = Test_definition_background_color
end
end
end
A()
end
{"survey_animation":906,"on.save_settings":742,"fw_app":"driver","on.load_settings":940,"Spawn_point":822,"from_viewport":823,"y_of_schema1":364,"interpolate_viewport":843,"table_and_array_both_empty":689,"get_default_map":937,"Manifest_navigator":495,"move_candidate_to_front_of_manifest":632,"B":830,"text_input_on_manifest_navigator":634,"manifest_coord":636,"A":831,"Animating":842,"manifest_navigator_candidates":638,"Menu_background_color":611,"Num_animation_frames":840,"Menu_border_color":612,"on.mouse_press":916,"Menu_command_color":613,"Menu_highlight_color":614,"add_hotkey_to_menu":616,"on.code_change":924,"draw_ticks":862,"add_thick_line":400,"draw_menu_bar":861,"copy_shape":396,"Test_definition_background_color":858,"definition_background_color":859,"draw_manifest_navigator":677,"num_lines_for_manifest_navigator":676,"vx":545,"maybe_update_key_in_definitions":529,"get_definition_from_app":784,"snapshot_canvas":913,"Save_viewport":865,"on.initialize":807,"copy_viewport":866,"zoom_out":908,"Ticks_font":669,"Viewport":604,"delete_definition":673,"Surface":422,"keychord_press_on_manifest_navigator":765,"on_handle":547,"zoom_in":920,"manifest_navigator_down":635,"Definitions":503,"manifest_navigator_up":628,"on_text":539,"surface_bounds":814,"on.code_submit":947,"on.update":945,"on.keychord_press":919,"Page":475,"sx":544,"load_from_iterator":670,"Manifest":769,"on.mouse_release":836,"Cursor_node":172,"load_manifest":694,"mouse_cursor":558,"get_manifest":768,"draw_load_time_error":929,"draw_test_failure_indicator":935,"vy":546,"Failing_test_definition_background_color":925,"animate_next_frame":915,"reset_manifest_navigator":772,"draw_run_time_error":808,"initialize_manifest_navigator":773,"new_definition":848,"Mouse_cursor":559,"on.key_release":720,"tick_spec":660,"schema1_of_y":667,"get_multiple_definitions_from_app":783,"scale":712,"update_editor_box":711,"Zoomed_out":869,"wait_for_response":781,"on":1,"compute_layout":385,"draw_cursor":639,"manifest_index":637,"approximate_up":658,"order_of_magnitude":573,"font":353,"on.draw":932,"animate_next":914,"sy":469,"approximate":579,"load_definition":854,"undo_zoom_out":921,"set_mouse_cursor":562,"Definition_background_color":849,"initialize_editor":678,"line_height":365,"box_height":680,"add_def_to_menu":640,"on.text_input":855,"fw_parent":946}
on.code_submit = function(editor)
if not editor.load_time_error then
Manifest_navigator.reload = true
end
-- update definition backgrounds of failing tests
for name,node in pairs(Definitions) do
-- ignore temporary definitions with numeric indices; they haven't been saved yet
if isstring(name) and starts_with(name, 'test_') then
if Client_app_test_failures[name] then
node.bg = Failing_test_definition_background_color
else
node.bg = Test_definition_background_color
end
end
end
A()
end
{"survey_animation":906,"on.save_settings":742,"fw_app":"driver","on.load_settings":940,"Spawn_point":822,"from_viewport":823,"y_of_schema1":364,"interpolate_viewport":843,"table_and_array_both_empty":689,"get_default_map":937,"Manifest_navigator":495,"move_candidate_to_front_of_manifest":632,"B":830,"text_input_on_manifest_navigator":634,"manifest_coord":636,"A":831,"Animating":842,"manifest_navigator_candidates":638,"Menu_background_color":611,"Num_animation_frames":840,"Menu_border_color":612,"on.mouse_press":916,"Menu_command_color":613,"Menu_highlight_color":614,"add_hotkey_to_menu":616,"on.code_change":924,"draw_ticks":862,"add_thick_line":400,"draw_menu_bar":861,"copy_shape":396,"Test_definition_background_color":858,"definition_background_color":859,"draw_manifest_navigator":677,"num_lines_for_manifest_navigator":676,"vx":545,"maybe_update_key_in_definitions":529,"get_definition_from_app":784,"snapshot_canvas":913,"Save_viewport":865,"on.initialize":807,"copy_viewport":866,"zoom_out":908,"Ticks_font":669,"Viewport":604,"delete_definition":673,"Surface":422,"keychord_press_on_manifest_navigator":765,"on_handle":547,"zoom_in":920,"manifest_navigator_down":635,"Definitions":503,"manifest_navigator_up":628,"on_text":539,"surface_bounds":814,"on.code_submit":946,"on.update":945,"on.keychord_press":919,"Page":475,"sx":544,"load_from_iterator":670,"Manifest":769,"on.mouse_release":836,"Cursor_node":172,"load_manifest":694,"mouse_cursor":558,"get_manifest":768,"draw_load_time_error":929,"draw_test_failure_indicator":935,"vy":546,"Failing_test_definition_background_color":925,"animate_next_frame":915,"reset_manifest_navigator":772,"draw_run_time_error":808,"initialize_manifest_navigator":773,"new_definition":848,"Mouse_cursor":559,"on.key_release":720,"tick_spec":660,"schema1_of_y":667,"get_multiple_definitions_from_app":783,"scale":712,"update_editor_box":711,"Zoomed_out":869,"wait_for_response":781,"on":1,"compute_layout":385,"draw_cursor":639,"manifest_index":637,"approximate_up":658,"order_of_magnitude":573,"font":353,"on.draw":932,"animate_next":914,"sy":469,"approximate":579,"load_definition":854,"undo_zoom_out":921,"set_mouse_cursor":562,"Definition_background_color":849,"initialize_editor":678,"line_height":365,"box_height":680,"add_def_to_menu":640,"on.text_input":855,"fw_parent":945}