• Jump To … +
    server.coffee src/actionknob.coffee src/autosem.coffee src/bitbucket_kba.coffee src/browserlog.coffee src/datareduction.coffee src/dci.coffee src/dciknob.coffee src/deeseeeye.coffee src/dnd.coffee src/doof.coffee src/formurla-mngr.coffee src/fractalpanel.coffee src/fractalpanel_test.coffee src/front.coffee src/ingestor.coffee src/kbabitbucket.coffee src/knobctrl.coffee src/lib_test.coffee src/nanoclock.coffee src/noodb.coffee src/noodbabstract.coffee src/noodbbrowser.coffee src/noodbbrowser_test.coffee src/noodbsec.coffee src/noorauth.coffee src/noorplugin.coffee src/noorquery.coffee src/noorvm.coffee src/noorwrite.coffee src/quadparser.coffee src/quadparsern3.coffee src/rbac.coffee src/reactor.coffee src/rebase.coffee src/rsrcidx.coffee src/sandboxactions.coffee src/screen_ctx.coffee src/spogi.coffee src/tabular_widget.coffee src/visctrl.coffee src/voicesknob.coffee src/whowhen.coffee src/xsd2native.coffee
  • deeseeeye.coffee

  • ¶

    https://docs.python.org/2/reference/datamodel.html#slots https://github.com/ciscoheat/haxedci-example

    class Context
      constructor: ->
        @roles = {}
        @interactions = {}
      add_interaction: (intrxn) ->
        @interactions[intrxn.name] = intrxn
    
    class Role
      constructor: (@name, @type) ->
    
    
    class PlayerAsRole
      constructor: (@player, @role_interface) ->
    
    class RoleBinding
      constructor: (@role, @player) ->
    
    class Interaction
      constructor: (@name, roles, args, @function_body) ->
        @roles = []
        @bound_roles = []
        @args = []
        @bound_args = []
        for role in roles
          @add_role(role)
        for arg in args
          @add_arg(arg)
      add_role: (role) ->
        @roles.push(role)
      bind: (role, player) ->
        @bound_roles.push(new RoleBinding(role, player))
      execute: ->
        if @roles.length isnt @bound_roles.length
          throw new Error("not all roles are bound")
        if @args.length isnt @bound_args.length
          throw new Error("not all args are bound")
        return @function_body()
    
    
    (exports ? this).Context = Context
    (exports ? this).Role = Role
    (exports ? this).Interaction = Interaction
  • ¶

    KnobController could be migrated to be all about DCI (ala deeseeeye).

    Q. How does this relate to what is currently happening in make_button_for? eg: button.on ‘click’, action

    A1. player: button use_case: on ‘click’ interaction: action

    A2. role: clickable player: button function_body: @clickable.on ‘click’, action NO_NO_NO:

    * function_body looks more like binding
    

    A3. # see sandboxactions.coffee ctx = new Context() rm_css = ctx.add_interaction new Interaction ‘remove_split_pane_css’, [‘split_pane_css’], [], -> @split_pane_css.remove() rm_css.bind(‘split_pane_css’, $(‘[href=”/bower_components/split-pane/split-pane.css”]’)) ctx.remove_split_pane_css.execute()

    ac = ctx.add_interaction new Interaction ‘add_contents’, [‘all_content_areas’], [], -> @all_content_areas.append(‘

  • another one’.repeat(5)) ac.bind()

    What would that look like?

    1. It would have Action ‘buttons’ which when clicked would have unambiguous Interaction instances executed.
    2. It would have Verb ‘buttons’ which when clicked would have unambiguous Interaction instances selected which would (based on subsequent gestures) bind objects to roles and values to arguments and then execute when fully satisfied (ie bound).
    3. Perhaps even widgets (and nested widgets) would be so handled (eg the Settings from Huviz)
    4. Ideally some (most!) of these would be specified by knowledge
    5. Possibly (likely) some would be hard coded in the visualization.
    6. Does each ‘Interaction’ (ie use-case) have its own content area which responds to a .render()?
    7. Is that how a new DeeSeeEye-driven tabular_widget will work?

    Q. What is the simplest thing which can be implemented to get this started?

    A. Refactor make_button_for so it:

    • makes action buttons (eventually rows in the Tabular widget)
    • which build Interactions hanging off a single Context
    • and which are wired to run Interaction.execute()