Programming environment for editing various of my live apps without restarting them.

bugfix: keep definition keys up to date

I connect keys and values bidirectionally ways inside Definitions:

  • Definitions is a table, and the key points at the value.
  • Each value (node; a table) also contains the corresponding key.

However, before this commit I was not updating the key inside the node when I was moving nodes around inside Definitions. And that was leading to errors when I moved nodes around the surface like:

Error: [string "REPL"]:12: attempt to index local 'node' (a nil value) stack traceback: [string "REPL"]:12: in function 'A1' [string "REPL"]:22: in function 'update' main.lua:196: in function 'update' app.lua:99: in function <app.lua:85> [C]: in function 'xpcall' app.lua:113: in function <app.lua:112> [C]: in function 'xpcall'

Why did I make this mistake? Because it's been easy to forget about node.key.

Created by  akkartik  on October 31, 2023
MYNGO5AJAKSG3TEJV2VLPF2P7QRP4SSNEX5WJMKPXAFH7XDCOIIQC
Change contents