Merge text.love

[?]
Sep 4, 2023, 9:10 PM
R6MB3UPBWL3PYRPVDCJFJIYGIJUV4ALGYUIGKGD3BZXCIAE6R5CQC

Dependencies

  • [2] IZGZEWFG switch to source editor on error
  • [3] CUFW4EJL reorganize app.lua and its comments
  • [4] DMS3N5YD undo an ancient hack; be an idiomatic LÖVE app
  • [5] AVTNUQYR basic test-enabled framework
  • [6] AGJXIDOF hardcode some assumptions about how this app uses love
  • [7] 3QNOKBFM beginnings of a test harness
  • [8] D2IADHMW link to default love.run for comparison
  • [9] CA5T33FG one more implication

Change contents

  • edit in app.lua at line 5
    [3.69][2.36:99]()
    -- * recover from errors (by switching to the source editor)
  • replacement in app.lua at line 36
    [3.440][2.100:178]()
    xpcall(function() love.handlers[name](a,b,c,d,e,f) end, handle_error)
    [3.440]
    [3.481]
    love.handlers[name](a,b,c,d,e,f)
  • replacement in app.lua at line 41
    [3.59][2.179:235]()
    xpcall(function() App.update(dt) end, handle_error)
    [3.59]
    [3.78]
    App.update(dt)
  • replacement in app.lua at line 45
    [3.273][2.236:271]()
    xpcall(App.draw, handle_error)
    [3.273]
    [3.288]
    App.draw()
  • edit in app.lua at line 52
    [3.2551][2.272:709]()
    function handle_error(err)
    Error_message = debug.traceback('Error: ' .. tostring(err), --[[stack frame]]2):gsub('\n[^\n]+$', '')
    print(Error_message)
    if Current_app == 'run' then
    Settings.current_app = 'source'
    love.filesystem.write('config', json.encode(Settings))
    load_file_from_source_or_save_directory('main.lua')
    App.undo_initialize()
    App.run_tests_and_initialize()
    else
    love.event.quit()
    end
    end