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?
- It would have Action ‘buttons’ which when clicked
would have unambiguous Interaction instances executed.
- 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).
- Perhaps even widgets (and nested widgets) would be so handled
(eg the Settings from Huviz)
- Ideally some (most!) of these would be specified by knowledge
- Possibly (likely) some would be hard coded in the visualization.
- Does each ‘Interaction’ (ie use-case) have its own content area
which responds to a .render()?
- 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()