Named actors

This commit is contained in:
Tony Garnock-Jones 2016-05-31 10:40:17 -04:00
parent f3645b9081
commit 9cee74b290
1 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@ assertion type person(id, firstName, lastName, address, age);
message type setSortColumn(number); message type setSortColumn(number);
function newRow(id, firstName, lastName, address, age) { function newRow(id, firstName, lastName, address, age) {
actor { actor named ('model' + id) {
react { react {
assert person(id, firstName, lastName, address, age); assert person(id, firstName, lastName, address, age);
} }
@ -18,7 +18,7 @@ function spawnModel() {
} }
function spawnView() { function spawnView() {
actor { actor named 'view' {
var ui = new Syndicate.UI.Anchor(); var ui = new Syndicate.UI.Anchor();
var orderColumn = 2; var orderColumn = 2;
@ -41,7 +41,7 @@ function spawnView() {
} }
function spawnController() { function spawnController() {
actor { actor named 'controller' {
react { react {
on message Syndicate.UI.globalEvent('table#the-table th', 'click', $e) { on message Syndicate.UI.globalEvent('table#the-table th', 'click', $e) {
:: setSortColumn(JSON.parse(e.target.dataset.column)); :: setSortColumn(JSON.parse(e.target.dataset.column));