[normal]
[not following]
Applications of COP in Lively Kernel
■ Modularization and deployment □ Behavioral Adaptations of Base Code □ example: adding item to context menu ■ Experimental Code □ Development in a Layer □ Scope to objects / pages / users ... ■ Meta-programming Tool □ example: Tracing
cop.create('ShowClickLayer').refineClass(Morph, { onMouseMove: function(evt) { show(evt.mousePoint) return cop.proceed(evt) }, onMouseDown: function(evt) { show(evt.mousePoint) return cop.proceed(evt) } }) // ShowClickLayer.beGlobal(); // ShowClickLayer.beNotGlobal();
$morph('DebugArea').setWithLayers([ShowClickLayer])