Friday, February 08, 2008

My kingdom for a Smalltalk block

Ever looked at the source code of the LivelyKernel, especially to Core.js:


applyFunctionToShape: function() { // my kingdom for a Smalltalk block!
var args = $A(arguments);
var func = args.shift();
func.apply(this.shape, args);
if (this.clipPath) {
console.log('clipped to new shape ' + this.shape);
this.clipToShape();
}
this.adjustForNewBounds();
}.wrap(Morph.onLayoutChange('shape')),

No comments: