Limitations:
Independent of this commit, I'm definitely seeing a couple of issues as I made these edits:
In both cases I have experience with these issues from my time hacking on pensieve.love.
JIBCAKTUIYZ2NAAOXJ7YBM72XG7FZA2AQL64MZBJVM62ELU2BO4AC
on.initialize = function()
load_manifest()
if table_and_array_both_empty(Definitions) then
new_definition()
end
A()
end
{"draw_ticks":663,"update_editor_box":570,"tick_spec":660,"order_of_magnitude":573,"schema1_of_y":667,"box_height":680,"approximate":579,"copy_shape":396,"load_definition":682,"approximate_up":658,"sy":469,"on.save_settings":687,"on.load_settings":688,"new_definition":681,"table_and_array_both_empty":689,"Manifest_navigator":495,"Surface":422,"draw_cursor":639,"on.mouse_release":554,"Menu_background_color":611,"on":1,"Menu_border_color":612,"Menu_command_color":613,"load_manifest":496,"Menu_highlight_color":614,"get_manifest":497,"draw_menu_bar":641,"add_hotkey_to_menu":616,"line_height":365,"draw_manifest_navigator":677,"Definitions":503,"num_lines_for_manifest_navigator":676,"reset_manifest_navigator":621,"load_from_iterator":670,"get_definition_from_app":624,"manifest_navigator_up":628,"initialize_editor":678,"manifest_navigator_down":635,"delete_definition":673,"move_candidate_to_front_of_manifest":632,"keychord_press_on_manifest_navigator":675,"on.draw":565,"vx":545,"manifest_coord":636,"A":507,"add_thick_line":400,"scale":7,"vy":546,"B":379,"on_handle":547,"sx":544,"mouse_cursor":558,"on.mouse_press":617,"text_input_on_manifest_navigator":634,"on_text":539,"manifest_index":637,"on.update":561,"manifest_navigator_candidates":638,"on.keychord_press":666,"maybe_update_key_in_definitions":529,"add_def_to_menu":640,"on.code_change":306,"Page":475,"Ticks_font":669,"y_of_schema1":364,"Cursor_node":172,"parent":691,"on.key_release":552,"on.initialize":692,"on.text_input":521,"Viewport":604,"compute_layout":385,"font":353,"Mouse_cursor":559,"set_mouse_cursor":562,"Manifest":494}
on.initialize = function()
load_manifest()
if table_and_array_both_empty(Definitions) then
new_definition()
end
A()
end
{"draw_ticks":663,"update_editor_box":570,"tick_spec":660,"order_of_magnitude":573,"schema1_of_y":667,"box_height":680,"approximate":579,"copy_shape":396,"load_definition":682,"approximate_up":658,"sy":469,"on.save_settings":687,"on.load_settings":688,"new_definition":681,"table_and_array_both_empty":689,"Manifest_navigator":495,"Surface":422,"draw_cursor":639,"on.mouse_release":554,"Menu_background_color":611,"on":1,"Menu_border_color":612,"Menu_command_color":613,"load_manifest":496,"Menu_highlight_color":614,"get_manifest":497,"draw_menu_bar":641,"add_hotkey_to_menu":616,"line_height":365,"draw_manifest_navigator":677,"Definitions":503,"num_lines_for_manifest_navigator":676,"reset_manifest_navigator":621,"load_from_iterator":670,"get_definition_from_app":624,"manifest_navigator_up":628,"initialize_editor":678,"manifest_navigator_down":635,"delete_definition":673,"move_candidate_to_front_of_manifest":632,"keychord_press_on_manifest_navigator":675,"on.draw":565,"vx":545,"manifest_coord":636,"A":507,"add_thick_line":400,"scale":7,"vy":546,"B":379,"on_handle":547,"sx":544,"mouse_cursor":558,"on.mouse_press":617,"text_input_on_manifest_navigator":634,"on_text":539,"manifest_index":637,"on.update":561,"manifest_navigator_candidates":638,"on.keychord_press":666,"maybe_update_key_in_definitions":529,"add_def_to_menu":640,"on.code_change":306,"Page":475,"Ticks_font":669,"y_of_schema1":364,"Cursor_node":172,"parent":690,"on.key_release":552,"on.initialize":691,"on.text_input":521,"Viewport":604,"compute_layout":385,"font":353,"Mouse_cursor":559,"set_mouse_cursor":562,"Manifest":494}
on.initialize = function()
load_manifest()
-- will this work? I'm hazy on the relative order of initialize and load_settings.
if table_and_array_both_empty(Definitions) then
new_definition()
end
A()
end
{"reset_manifest_navigator":621,"load_from_iterator":670,"get_definition_from_app":624,"add_thick_line":400,"line_height":365,"manifest_navigator_up":628,"maybe_update_key_in_definitions":529,"manifest_navigator_down":635,"on.initialize":690,"delete_definition":673,"on.save_settings":687,"scale":7,"on.load_settings":688,"keychord_press_on_manifest_navigator":675,"text_input_on_manifest_navigator":634,"table_and_array_both_empty":689,"manifest_index":637,"manifest_navigator_candidates":638,"vx":545,"vy":546,"on_text":539,"on.mouse_release":554,"new_definition":681,"Page":475,"draw_cursor":639,"on.key_release":552,"tick_spec":660,"mouse_cursor":558,"on":1,"Mouse_cursor":559,"font":353,"update_editor_box":570,"on.code_change":306,"approximate":579,"y_of_schema1":364,"approximate_up":658,"Ticks_font":669,"add_def_to_menu":640,"on.keychord_press":666,"Cursor_node":172,"parent":689,"copy_shape":396,"move_candidate_to_front_of_manifest":632,"on.draw":565,"B":379,"on.text_input":521,"Viewport":604,"Manifest_navigator":495,"compute_layout":385,"Surface":422,"load_definition":682,"A":507,"draw_manifest_navigator":677,"schema1_of_y":667,"on.mouse_press":617,"sy":469,"draw_ticks":663,"initialize_editor":678,"on.update":561,"get_manifest":497,"Menu_background_color":611,"Manifest":494,"Menu_border_color":612,"Menu_command_color":613,"load_manifest":496,"order_of_magnitude":573,"Menu_highlight_color":614,"manifest_coord":636,"draw_menu_bar":641,"sx":544,"add_hotkey_to_menu":616,"box_height":680,"on_handle":547,"Definitions":503,"set_mouse_cursor":562,"num_lines_for_manifest_navigator":676}
table_and_array_both_empty = function(x)
for _,_ in pairs(x) do
return false
end
return true
end
{"Page":475,"initialize_editor":678,"add_thick_line":400,"approximate_up":658,"copy_shape":396,"Manifest_navigator":495,"Ticks_font":669,"new_definition":681,"Manifest":494,"load_manifest":496,"get_manifest":497,"on.text_input":521,"scale":7,"Definitions":503,"on.initialize":506,"A":507,"Menu_command_color":613,"B":379,"table_and_array_both_empty":689,"draw_menu_bar":641,"add_hotkey_to_menu":616,"draw_manifest_navigator":677,"num_lines_for_manifest_navigator":676,"reset_manifest_navigator":621,"load_from_iterator":670,"maybe_update_key_in_definitions":529,"get_definition_from_app":624,"on":1,"manifest_navigator_up":628,"draw_cursor":639,"manifest_navigator_down":635,"delete_definition":673,"move_candidate_to_front_of_manifest":632,"keychord_press_on_manifest_navigator":675,"manifest_coord":636,"on_handle":547,"manifest_index":637,"parent":688,"manifest_navigator_candidates":638,"on_text":539,"sy":469,"load_definition":682,"update_editor_box":570,"sx":544,"on.save_settings":687,"on.key_release":552,"schema1_of_y":667,"Cursor_node":172,"line_height":365,"box_height":680,"font":353,"y_of_schema1":364,"tick_spec":660,"mouse_cursor":558,"on.code_change":306,"Mouse_cursor":559,"vx":545,"on.update":561,"Viewport":604,"set_mouse_cursor":562,"vy":546,"draw_ticks":663,"Menu_highlight_color":614,"Menu_border_color":612,"Surface":422,"compute_layout":385,"on.mouse_press":617,"text_input_on_manifest_navigator":634,"on.mouse_release":554,"on.draw":565,"order_of_magnitude":573,"Menu_background_color":611,"on.keychord_press":666,"on.load_settings":688,"add_def_to_menu":640,"approximate":579}
on.load_settings = function(settings)
Viewport = settings.viewport
Definitions = settings.definitions
for name, def in pairs(Definitions) do
def.data = load_from_iterator(get_definition_from_app(name):gmatch("[^\r\n]+"))
end
end
{"add_thick_line":400,"draw_ticks":663,"copy_shape":396,"maybe_update_key_in_definitions":529,"compute_layout":385,"order_of_magnitude":573,"load_definition":682,"update_editor_box":570,"approximate":579,"on.save_settings":687,"on.load_settings":688,"on_handle":547,"y_of_schema1":364,"on.mouse_press":617,"on.mouse_release":554,"sx":544,"initialize_editor":678,"vx":545,"on.key_release":552,"on":1,"on.text_input":521,"mouse_cursor":558,"Menu_background_color":611,"Mouse_cursor":559,"Menu_border_color":612,"Menu_command_color":613,"Menu_highlight_color":614,"draw_menu_bar":641,"add_hotkey_to_menu":616,"scale":7,"draw_manifest_navigator":677,"num_lines_for_manifest_navigator":676,"draw_cursor":639,"reset_manifest_navigator":621,"load_from_iterator":670,"get_definition_from_app":624,"sy":469,"Surface":422,"manifest_navigator_down":635,"on.draw":565,"delete_definition":673,"Viewport":604,"box_height":680,"on.initialize":506,"A":507,"manifest_coord":636,"B":379,"manifest_index":637,"manifest_navigator_candidates":638,"on.keychord_press":666,"add_def_to_menu":640,"move_candidate_to_front_of_manifest":632,"Manifest":494,"text_input_on_manifest_navigator":634,"Page":475,"load_manifest":496,"schema1_of_y":667,"get_manifest":497,"manifest_navigator_up":628,"parent":687,"on.code_change":306,"font":353,"keychord_press_on_manifest_navigator":675,"approximate_up":658,"Definitions":503,"vy":546,"new_definition":681,"Cursor_node":172,"Manifest_navigator":495,"on.update":561,"on_text":539,"tick_spec":660,"Ticks_font":669,"line_height":365,"set_mouse_cursor":562}
on.save_settings = function()
for key,node in pairs(Definitions) do
if type(key) == 'number' then
-- can't save the array side for now because of a limitation in the
Definitions[key] = nil
else
node.data = nil -- don't save uncommitted data for now
node.editor = nil -- TODO: check for hierarchy
end
end
return {
viewport=Viewport,
definitions=Definitions,
}
end
{"Surface":422,"keychord_press_on_manifest_navigator":675,"draw_cursor":639,"on.draw":565,"new_definition":681,"on.key_release":552,"manifest_coord":636,"manifest_index":637,"on.text_input":521,"vy":546,"on.initialize":506,"add_def_to_menu":640,"mouse_cursor":558,"copy_shape":396,"Mouse_cursor":559,"on.mouse_release":554,"B":379,"maybe_update_key_in_definitions":529,"set_mouse_cursor":562,"on.keychord_press":666,"draw_ticks":663,"initialize_editor":678,"tick_spec":660,"on_handle":547,"order_of_magnitude":573,"load_definition":682,"Page":475,"box_height":680,"approximate":579,"compute_layout":385,"font":353,"on.save_settings":687,"Viewport":604,"on.load_settings":684,"approximate_up":658,"Ticks_font":669,"Cursor_node":172,"scale":7,"sy":469,"Menu_background_color":611,"sx":544,"Menu_border_color":612,"manifest_navigator_candidates":638,"Menu_command_color":613,"on.update":561,"Menu_highlight_color":614,"vx":545,"draw_menu_bar":641,"on_text":539,"add_hotkey_to_menu":616,"Manifest_navigator":495,"add_thick_line":400,"draw_manifest_navigator":677,"line_height":365,"num_lines_for_manifest_navigator":676,"Definitions":503,"y_of_schema1":364,"reset_manifest_navigator":621,"on":1,"on.code_change":306,"load_from_iterator":670,"update_editor_box":570,"get_definition_from_app":624,"A":507,"Manifest":494,"parent":686,"on.mouse_press":617,"manifest_navigator_up":628,"load_manifest":496,"manifest_navigator_down":635,"get_manifest":497,"schema1_of_y":667,"delete_definition":673,"text_input_on_manifest_navigator":634,"move_candidate_to_front_of_manifest":632}
on.save_settings = function()
for key,node in pairs(Definitions) do
if type(key) == 'number' then
-- can't save the array side for now because of a limitation in the
Definitions[key] = nil
else
node.editor = nil -- TODO: check for hierarchy
end
end
return {
viewport=Viewport,
definitions=Definitions,
}
end
{"add_def_to_menu":640,"sx":544,"update_editor_box":570,"B":379,"on.mouse_release":554,"on.key_release":552,"schema1_of_y":667,"mouse_cursor":558,"Mouse_cursor":559,"set_mouse_cursor":562,"draw_ticks":663,"compute_layout":385,"parent":685,"on.code_change":306,"order_of_magnitude":573,"initialize_editor":678,"approximate":579,"on.draw":565,"approximate_up":658,"Ticks_font":669,"on.initialize":506,"y_of_schema1":364,"sy":469,"Manifest":494,"load_manifest":496,"get_manifest":497,"draw_cursor":639,"Menu_background_color":611,"Page":475,"tick_spec":660,"Definitions":503,"Menu_command_color":613,"new_definition":681,"Menu_highlight_color":614,"Menu_border_color":612,"draw_menu_bar":641,"A":507,"add_hotkey_to_menu":616,"on.text_input":521,"Viewport":604,"draw_manifest_navigator":677,"Surface":422,"vy":546,"manifest_index":637,"load_definition":682,"reset_manifest_navigator":621,"Manifest_navigator":495,"on.mouse_press":617,"load_from_iterator":670,"font":353,"line_height":365,"on.update":561,"scale":7,"on.keychord_press":666,"text_input_on_manifest_navigator":634,"on.save_settings":686,"maybe_update_key_in_definitions":529,"on.load_settings":684,"get_definition_from_app":624,"box_height":680,"delete_definition":673,"manifest_navigator_down":635,"move_candidate_to_front_of_manifest":632,"manifest_navigator_up":628,"keychord_press_on_manifest_navigator":675,"on":1,"on_handle":547,"Cursor_node":172,"copy_shape":396,"manifest_coord":636,"add_thick_line":400,"on_text":539,"vx":545,"manifest_navigator_candidates":638,"num_lines_for_manifest_navigator":676}
on.save_settings = function()
for _,node in pairs(Definitions) do
node.editor = nil -- TODO: check for hierarchy
end
return {
viewport=Viewport,
definitions=Definitions,
}
end
{"load_definition":682,"scale":7,"on.draw":565,"sy":469,"add_thick_line":400,"on.mouse_release":554,"copy_shape":396,"Manifest_navigator":495,"box_height":680,"Cursor_node":172,"Manifest":494,"Surface":422,"compute_layout":385,"get_manifest":497,"on.code_change":306,"vx":545,"Definitions":503,"on.save_settings":685,"draw_ticks":663,"on.mouse_press":617,"get_definition_from_app":624,"on.update":561,"on.keychord_press":666,"initialize_editor":678,"manifest_navigator_up":628,"manifest_navigator_down":635,"approximate":579,"delete_definition":673,"move_candidate_to_front_of_manifest":632,"keychord_press_on_manifest_navigator":675,"text_input_on_manifest_navigator":634,"approximate_up":658,"manifest_coord":636,"manifest_index":637,"Ticks_font":669,"manifest_navigator_candidates":638,"on.load_settings":684,"Menu_background_color":611,"add_def_to_menu":640,"Menu_border_color":612,"order_of_magnitude":573,"Menu_command_color":613,"line_height":365,"font":353,"on_handle":547,"draw_menu_bar":641,"Mouse_cursor":559,"add_hotkey_to_menu":616,"on_text":539,"new_definition":681,"draw_manifest_navigator":677,"load_manifest":496,"num_lines_for_manifest_navigator":676,"update_editor_box":570,"parent":684,"reset_manifest_navigator":621,"maybe_update_key_in_definitions":529,"sx":544,"load_from_iterator":670,"tick_spec":660,"on":1,"on.key_release":552,"vy":546,"schema1_of_y":667,"y_of_schema1":364,"on.text_input":521,"Viewport":604,"on.initialize":506,"Menu_highlight_color":614,"A":507,"mouse_cursor":558,"Page":475,"draw_cursor":639,"B":379,"set_mouse_cursor":562}
on.load_settings = function(settings)
Viewport = settings.viewport
Definitions = settings.definitions
end
{"load_definition":682,"scale":7,"on.draw":565,"sy":469,"add_thick_line":400,"on.mouse_release":554,"copy_shape":396,"Manifest_navigator":495,"box_height":680,"Cursor_node":172,"Manifest":494,"Surface":422,"compute_layout":385,"get_manifest":497,"on.code_change":306,"vx":545,"Definitions":503,"on.save_settings":683,"draw_ticks":663,"on.mouse_press":617,"get_definition_from_app":624,"on.update":561,"on.keychord_press":666,"initialize_editor":678,"manifest_navigator_up":628,"manifest_navigator_down":635,"approximate":579,"delete_definition":673,"move_candidate_to_front_of_manifest":632,"keychord_press_on_manifest_navigator":675,"text_input_on_manifest_navigator":634,"approximate_up":658,"manifest_coord":636,"manifest_index":637,"Ticks_font":669,"manifest_navigator_candidates":638,"on.load_settings":684,"Menu_background_color":611,"add_def_to_menu":640,"Menu_border_color":612,"order_of_magnitude":573,"Menu_command_color":613,"line_height":365,"font":353,"on_handle":547,"draw_menu_bar":641,"Mouse_cursor":559,"add_hotkey_to_menu":616,"on_text":539,"new_definition":681,"draw_manifest_navigator":677,"load_manifest":496,"num_lines_for_manifest_navigator":676,"update_editor_box":570,"parent":683,"reset_manifest_navigator":621,"maybe_update_key_in_definitions":529,"sx":544,"load_from_iterator":670,"tick_spec":660,"on":1,"on.key_release":552,"vy":546,"schema1_of_y":667,"y_of_schema1":364,"on.text_input":521,"Viewport":604,"on.initialize":506,"Menu_highlight_color":614,"A":507,"mouse_cursor":558,"Page":475,"draw_cursor":639,"B":379,"set_mouse_cursor":562}
on.save_settings = function()
return {
viewport=Viewport,
definitions=Definitions,
}
end
{"load_definition":682,"scale":7,"on.draw":565,"sy":469,"add_thick_line":400,"on.mouse_release":554,"copy_shape":396,"Manifest_navigator":495,"box_height":680,"Cursor_node":172,"Manifest":494,"Surface":422,"compute_layout":385,"get_manifest":497,"on.code_change":306,"vx":545,"Definitions":503,"on.save_settings":683,"draw_ticks":663,"on.mouse_press":617,"get_definition_from_app":624,"on.update":561,"on.keychord_press":666,"initialize_editor":678,"manifest_navigator_up":628,"manifest_navigator_down":635,"approximate":579,"delete_definition":673,"move_candidate_to_front_of_manifest":632,"keychord_press_on_manifest_navigator":675,"text_input_on_manifest_navigator":634,"approximate_up":658,"manifest_coord":636,"manifest_index":637,"Ticks_font":669,"manifest_navigator_candidates":638,"Menu_background_color":611,"add_def_to_menu":640,"Menu_border_color":612,"order_of_magnitude":573,"Menu_command_color":613,"line_height":365,"font":353,"on_handle":547,"draw_menu_bar":641,"Mouse_cursor":559,"add_hotkey_to_menu":616,"on_text":539,"new_definition":681,"draw_manifest_navigator":677,"load_manifest":496,"num_lines_for_manifest_navigator":676,"update_editor_box":570,"parent":682,"reset_manifest_navigator":621,"maybe_update_key_in_definitions":529,"sx":544,"load_from_iterator":670,"tick_spec":660,"on":1,"on.key_release":552,"vy":546,"schema1_of_y":667,"y_of_schema1":364,"on.text_input":521,"Viewport":604,"on.initialize":506,"Menu_highlight_color":614,"A":507,"mouse_cursor":558,"Page":475,"draw_cursor":639,"B":379,"set_mouse_cursor":562}