working on bind
This commit is contained in:
parent
12a4fca495
commit
c60f540685
|
@ -35,6 +35,7 @@
|
||||||
view-text
|
view-text
|
||||||
update-view-text
|
update-view-text
|
||||||
|
|
||||||
|
view-bind
|
||||||
|
|
||||||
view-attr
|
view-attr
|
||||||
update-view-attr
|
update-view-attr
|
||||||
|
|
|
@ -174,6 +174,22 @@
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
MockView.prototype.bind = function(name, worldF) {
|
||||||
|
// return new EventHandler('on-tick',
|
||||||
|
// new TickEventSource(delay),
|
||||||
|
// onTick);
|
||||||
|
|
||||||
|
return this.act(
|
||||||
|
function(cursor) {
|
||||||
|
return cursor;
|
||||||
|
//return cursor.replaceNode($(cursor.node).clone(true).bind(name,
|
||||||
|
},
|
||||||
|
function(view) {
|
||||||
|
return view;
|
||||||
|
//view.focus.bind...
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@ -888,5 +904,17 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
EXPORTS['view-bind'] = makePrimitiveProcedure(
|
||||||
|
'view-bind',
|
||||||
|
3,
|
||||||
|
function(MACHINE) {
|
||||||
|
var view = checkMockView(MACHINE, 'view-bind', 0);
|
||||||
|
var name = checkSymbolOrString(MACHINE, 'view-bind', 1).toString();
|
||||||
|
var worldF = wrapFunction(checkProcedure(MACHINE, 'view-bind', 2));
|
||||||
|
return view.bind(name, worldF);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
}());
|
}());
|
|
@ -59,4 +59,8 @@
|
||||||
(error 'view-attr "Please run in JavaScript context."))
|
(error 'view-attr "Please run in JavaScript context."))
|
||||||
|
|
||||||
(define (update-view-attr v attr-name value)
|
(define (update-view-attr v attr-name value)
|
||||||
(error 'update-view-attr "Please run in JavaScript context."))
|
(error 'update-view-attr "Please run in JavaScript context."))
|
||||||
|
|
||||||
|
|
||||||
|
(define (view-bind v type worldF)
|
||||||
|
(error 'view-bind "Please run in JavaScript context."))
|
Loading…
Reference in New Issue
Block a user