Hi, Benjamin -
did you already skype with Robert about this? I put the mailing list on CC, maybe it is also of interest to others.... Am 23.01.2012 um 13:02 schrieb Benjamin Gnauk:
In lively our scripts are properties of objects, so editing a script means putting a function into a slot of an object.
There is a keyboard shortcut for it: CMD + SHIFT + P (windows: CTRL+SHIFT +P). select a expression, for example "this" and go for it. You have to scroll since, we not yet put this into a nicer organization...
In Lively2 the events are handles by the browser, we do not do the dispatching ourselves any more. Here are some Code snippets, that can be found with the code search (CMD+SHIFT+F): lively.morphic.Morph.addMethods({
registerForEvents: function (handleOnCapture) {
this.registerForMouseEvents(handleOnCapture);
this.registerForKeyboardEvents(handleOnCapture);
this.registerForOtherEvents(handleOnCapture);
this.registerForTouchEvents(handleOnCapture);
this.registerForFocusAndBlurEvents();
}
}); lively.morphic.Morph.addMethods({
registerForMouseEvents: function (handleOnCapture) {
if (this.onMouseUpEntry) this.registerForEvent('mouseup', this, 'onMouseUpEntry', handleOnCapture);
if (this.onMouseDownEntry) this.registerForEvent('mousedown', this, 'onMouseDownEntry', handleOnCapture);
if (this.onClick) this.registerForEvent('click', this, 'onClick', handleOnCapture);
if (this.onMouseMoveEntry) this.registerForEvent('mousemove', this, 'onMouseMoveEntry', handleOnCapture);
if (this.onDoubleClick) this.registerForEvent('dblclick', this, 'onDoubleClick', handleOnCapture);
The "onSomething" are then methods on each morph that do the work....
As childNodes of the parents div element.
Have a look at the morphNode of our list morph: <?xml version="1.0"?>
<div xmlns="http://www.w3.org/1999/xhtml" tabindex="-1" style="-webkit-transform-origin-x: 0px; -webkit-transform-origin-y: 0px; position: absolute; left: 871px; top: 265px; -webkit-transform: rotate(0deg) scale(1, 1); ">
<div style="position: absolute; left: 0px; top: 0px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(243, 243, 243); opacity: 1; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-top-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-bottom-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); width: 100px; height: 100px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; overflow-x: visible; overflow-y: visible; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-left-radius: 0px 0px; border-top-right-radius: 0px 0px; border-bottom-right-radius: 0px 0px; border-bottom-left-radius: 0px 0px; background-position: initial initial; background-repeat: initial initial; ">
<select size="2" style="white-space: pre; overflow-x: auto; overflow-y: auto; font-size: 10pt; font-family: Helvetica; left: 0px; top: 0px; width: 100px; height: 100px; " class="visibleSelection">
<option>1</option>
<option>2</option>
<option>3</option>
</select>
</div>
</div>
We do not have different themes in Lively2 yet. But ask Lauritz and Fabian, they are working on one right now.
I hope I could answer some of them. Best, Jens _______________________________________________ lively-kernel mailing list [hidden email] http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel |
Free forum by Nabble | Edit this page |