Skip to content

Commit

Permalink
Allow HTMLView to communicate back to server
Browse files Browse the repository at this point in the history
  • Loading branch information
tcstewar committed Apr 25, 2016
1 parent 5074e9d commit f9bf92f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nengo_gui/components/htmlview.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,6 @@ def javascript(self):

def code_python_args(self, uids):
return [uids[self.obj]]

def message(self, msg):
self.obj_output._nengo_message_ = msg;
2 changes: 2 additions & 0 deletions nengo_gui/static/components/htmlview.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Nengo.HTMLView = function(parent, sim, args) {
this.pdiv.classList.add('htmlview');
this.div.appendChild(this.pdiv);

this.pdiv.ws = this.ws;

/** for storing the accumulated data */
this.data_store = new Nengo.DataStore(1, this.sim, 0);

Expand Down

0 comments on commit f9bf92f

Please sign in to comment.