Skip to content
Snippets Groups Projects
bootstrap.js 1.37 KiB
Newer Older
  • Learn to ignore specific revisions
  • // IDDE sends msgs to manager, does display etc
    
    Jake Read's avatar
    Jake Read committed
    // 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 ?
    
    Jake Read's avatar
    Jake Read committed
    
    import Manager from './hunks/manager.js'
    
    // this is the TL
    
    // but heirarchichally, we can slave views to managers ...
    // views push messages to managers ...
    
    Jake Read's avatar
    Jake Read committed
    
    // our invisible overlord
    let NROL = new Manager()
    
    NROL.init()
    
    // this is going to sit in the outbuffer until the view resolves
    
    Jake Read's avatar
    Jake Read committed
    
    function bootloop() {
    
      // js u wyldin ! (this is probably slow)
    
        //go = false
        console.error('top level err:', err)
    
    Jake Read's avatar
    Jake Read committed
    }
    
    
    // want handles on this we think ?
    
    Jake Read's avatar
    Jake Read committed
    let View = {}
    
    
      console.log('BOOTUP')
      NROL.addHunk('view').then((view) => {
        // console.log('ADDHUNK VIEW RESOLVES')
        View = view
        view.isTopLevelView = true
        // not really sure about this yet
        $(View.dom).attr('id', 'NROLVIEW')
        $('#wrapper').get(0).append(View.dom)
      }).then(() => {
    
        // outHunkIndex, outIndex, inHunkIndex, inIndex, debug
    
        NROL.addLink(1, 0, 0, 0, true)
        NROL.addLink(0, 0, 1, 0, true)
        bootloop()
        // kick this later
        setTimeout(View.refresh, 150)
      }).catch((err) => {
        console.log(err)
      })