Code originally attempts to pass a Buffer into the editor contents, which fails with the following error:
TypeError: Cannot convert value "[object Uint8Array]" to type gchararray
at GtkSourceBuffer.text (/home/sven/projects/_3rdparty/node-gtk/lib/bootstrap.js:194:21)
at loadFile (/home/sven/projects/_3rdparty/node-gtk/examples/editor.js:83:21)
at Object.<anonymous> (/home/sven/projects/_3rdparty/node-gtk/examples/editor.js:213:1)
at Module._compile (node:internal/modules/cjs/loader:1155:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
at Module.load (node:internal/modules/cjs/loader:1033:32)
at Function.Module._load (node:internal/modules/cjs/loader:868:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:22:47
Seems that the editor contents are actually expected to be a string, so this decodes it as a (UTF8) string instead. Quick test seemed to work.
Code originally attempts to pass a Buffer into the editor contents, which fails with the following error:
Seems that the editor contents are actually expected to be a string, so this decodes it as a (UTF8) string instead. Quick test seemed to work.