From a mail
Two small demos:
http://lively-kernel.org/repository/webwerkstatt/demos/VisualConnect.mov
http://lively-kernel.org/repository/webwerkstatt/demos/CPUVisualization.mov
Visual feedback could be better but apart from that they are working very well.
Connection points are defined in an instance variable connections. For the clock it is for example
clock.connections = {setHands: {}}
The object after the name can be used for parameterizing the connection (type, direction, etc). The exact format is not yet determined. The connections for morph are defined as follows:
connections: {
name: {},
position: { map: '_Position'},
rotation: { map: '_Rotation'},
scale: { map: '_Scale'},
borderWidth: { map: 'shape._BorderWidth'},
borderColor: { map: 'shape._BorderColor'},
fill: { map: 'shape._Fill'},
extent: { map: 'shape._Extent'},
globalTransform: {
connectionClassType: 'lively.morphic.GeometryTransformConnection'}}
Here we are using map for aliasing and accessing a path (instance variables) and are able to define a class that should be used for the connection. The standard class used is AttributeConnection defined in lively.bindings but for connections that do more than connect instance variables with each other one can use customized connections. Jens did this to create a connection that is triggered when the global transformation of a morph changes.
The connections slot can be overwritten in subclasses/objects because it is merged using Object.mergePropertyInHierarchy