Newer
Older
// IDDE sends msgs to manager, does display etc
// starts with a native manager
/* codename NROL39 aka cuttlefish */
/* aka the teuthologist */
// this is toplevel, UI is meta-hunk
// we run loop where UI passes messages to bower manager
// this is like the manager 'bootstrap' file ?
import Manager from './hunks/manager.js'
// this is the TL
// but heirarchichally, we can slave views to managers ...
// views push messages to managers ...
// our invisible overlord
let NROL = new Manager()
NROL.id = 'NROL39_0'
NROL.init()
function bootloop() {
NROL.loop()
setTimeout(bootloop)
}
// 2nd tier
NROL.addHunk('manager').then((native) => {
Native = native
console.log('HELLO MANAGER', Native)
NROL.addLink(View.id, 'msgs', Native.id, 'msgs')
NROL.addLink(Native.id, 'msgs', View.id, 'msgs')
// do startup program load
console.log("BEGIN THE PROGRAM LOADETH")
Native.addProgram('programs/linktest').then((x) => {
console.log('PROGRAM LOADETH SUCCESS', x)
Native.describeRunningProgram()
}).catch((err) => {
console.log('PROGRAM LOADETH NOT', err)
})
// let this happen in the context of the loop running?
bootloop()
Native.addHunk('input/string').then((str) => {
Native.addHunk('interface/logger').then((lgr) => {
Native.addLinkByObject(str, 'string', lgr, 'tolog')
Native.sendHunkAsDef(str)
Native.sendHunkAsDef(lgr)