Skip to content
Snippets Groups Projects
bootstrap.js 1.45 KiB
Newer Older
  • Learn to ignore specific revisions
  • Jake Read's avatar
    Jake Read committed
    // 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.name = 'manager'
    
    Jake Read's avatar
    Jake Read committed
    NROL.id = 'NROL39_0'
    
    NROL.init()
    
    Jake Read's avatar
    Jake Read committed
    
    function bootloop() {
        NROL.loop()
        setTimeout(bootloop)
    }
    
    
    // want handles on this we think ? 
    
    Jake Read's avatar
    Jake Read committed
    let View = {}
    
    
    window.onload = () => {
        console.log('BOOTUP')
    
    Jake Read's avatar
    Jake Read committed
        NROL.addHunk('hidden/view', 'TLView').then((view) => {
    
    Jake Read's avatar
    Jake Read committed
            console.log('ADDHUNK VIEW RESOLVES')
    
            View = view
            $('#wrapper').get(0).append(View.dom)
        }).then(() => {
            NROL.addLink(View.id, 'msgs', NROL.id, 'msgs')
        }).then(() => {
            NROL.addLink(NROL.id, 'msgs', View.id, 'msgs')
    
    Jake Read's avatar
    Jake Read committed
            // ... how do we setup init routines for views / connections ? 
            // NROL.describeRunningProgram()
    
            // and then we can load this program
    
    Jake Read's avatar
    Jake Read committed
            NROL.addProgram('mvnv').then((newHunks) => {
                // auto added to view (should be)
            }).catch((err) => {
                console.log('err on opening bootsrap program', err)
    
    Jake Read's avatar
    Jake Read committed
        }).catch((err) => {
            console.log(err)
    
    Jake Read's avatar
    Jake Read committed
    }