Lively Kernel canvas
Savefalsenullnulltrue
RunTestfalsenull>' + result.selector;\n\t\t\tmsg += '\\n';\n\t\t\tmsg += result.err.message;\n\t\t\treturn msg;\n\t\t}).join('\\n---------\\n');\n\t\t$morph('testResult').setExtent(pt(400,20))\n\t\t$morph('testResult').setFill(Color.red);\n\t\t$morph('testResult').setTextString(failStr);\n\t} /* runFinished */"]]>null
ModelTest
658
nullfalsetruenullfalse
Tests.ModelTest.ConnectionSerializationTest[class]falsenullfalse
false
false
falsenullfalse
localrequirements[doit]falsetruefalse0false
initializer[doit]falsetruefalse0false
Tests.ModelTest.ConnectionTest[class]falsetruefalse0false372.5-1nullnullnulltruetruetrue
1true
null
null
null
nulltruetrue
-----falsetruefalse0false372.5
-1nullnullnulltruetruetrue
1true
null
null
null
nulltruetrue
20null
truetrue2000000truetrue
1truetruetrue
20null
truetruetruetrue
1truetruetrue
Browseworld...falsenullfalsetrue
Pushchangesbackfalsenullfalsetrue
Refreshfalsenullfalsetrue
Evalonfalsenullfalsetrue
Sortfalsenullfalsetrue
truetruefalsenullnullnullnullfalse
0nullnullfalsetruefalse
1nullnullfalsetruefalse
2nullnullfalsetruefalse
3nullnullfalsetruefalse
4nullnullfalsetruefalse
-1nullnullfalsetruefalse
-2nullnullfalsetruefalse
-3nullnullfalsetruefalse
-4nullnullfalsetruefalse
this.shape.allPartNames()c=$morph('curve')c.shape.allPartNames()c.shape.vertices()c.shape.elements[PathElement("M7,6"),PathElement("Q7,6-12,51"),PathElement("Q-31,9678,60"),PathElement("Q187,24101,4")]p=$morph('poly')p.shape.allPartNames()p.shape.vertices()
nulltruetruetruefalse11truetruefalse
false1truefalsetruetruefalse
nullfalsetruenullfalse
falsenullfalse
false
false
falsenullfalsefalsenullnullnullnullfalse
0nullnullfalsetruefalse
1nullnullfalsetruefalse
2nullnullfalsetruefalse
3nullnullfalsetruefalse
5nullnullfalsetruefalse
6nullnullfalsetruefalse
7nullnullfalsetruefalse
10002.7668199529505393Wikicontroltrue
nullfalsetruenullfalse
scene.js:lively.data.Wrapperfalsenullfalse
false
false
falsenullfalse
http://www.lively-kernel.org/repository/webwerkstatt/lively/truetruetruetruetrue
truetrue
1truetruetrue
codebasefalsenullfalsetrue
localfalsenullfalsetrue
Base.js(notparsed)falsetruefalse0false
bindings.js(notparsed)falsetruefalse0false
CanvasExpt.js(notparsed)falsetruefalse0false
ChangeSet.js(notparsed)falsetruefalse0false
Connector.js(notparsed)falsetruefalse0false
Contributions.js(notparsed)falsetruefalse0false
Core.js(notparsed)falsetruefalse0false
Data.js(notparsed)falsetruefalse0false
defaultconfig.js(notparsed)falsetruefalse0false
demofx.js(notparsed)falsetruefalse0false
EmuDom.js(notparsed)falsetruefalse0false
Examples.js(notparsed)falsetruefalse0false
Fabrik.js(notparsed)falsetruefalse0false
FileUploadWidget.js(notparsed)falsetruefalse0false
Graffle.js(notparsed)falsetruefalse0false
GridLayout.js(notparsed)falsetruefalse0false
Helper.js(notparsed)falsetruefalse0false
ide.js(notparsed)falsetruefalse0false
JSON.js(notparsed)falsetruefalse0false
lk-js-parser.ometa(notparsed)falsetruefalse0false
LKFileParser.js(notparsed)falsetruefalse0false
LKFileParser.ometa(notparsed)falsetruefalse0false
LKWiki.js(notparsed)falsetruefalse0false
Localcodefalsetruefalse0false
localconfig.js(notparsed)falsetruefalse0false
Main.js(notparsed)falsetruefalse0false
miniprototype.js(notparsed)falsetruefalse0false
Network.js(notparsed)falsetruefalse0false
obsolete.js(notparsed)falsetruefalse0false
Ometa.js(notparsed)falsetruefalse0false
phone.js(notparsed)falsetruefalse0false
Presentation.js(notparsed)falsetruefalse0false
rhino-compat.js(notparsed)falsetruefalse0false
scene.jsfalsetruefalse0false
Serialization.js(notparsed)falsetruefalse0false
simpleMain.js(notparsed)falsetruefalse0false
SmalltalkParser.js(notparsed)falsetruefalse0false
SmalltalkParser.ometa(notparsed)falsetruefalse0false
SmalltalkParserSupport.js(notparsed)falsetruefalse0false
Storage.js(notparsed)falsetruefalse0false
Styles.js(notparsed)falsetruefalse0false
TestFramework.js(notparsed)falsetruefalse0false
TestRunnerExtensions.js(notparsed)falsetruefalse0false
Text.js(notparsed)falsetruefalse0false
TileScripting.js(notparsed)falsetruefalse0false
Tools.js(notparsed)falsetruefalse0false
TouchSupport.js(notparsed)falsetruefalse0false
Undo.js(notparsed)falsetruefalse0false
WebPIM.js(notparsed)falsetruefalse0false
Widgets.js(notparsed)falsetruefalse0false
WikiParser.js(notparsed)falsetruefalse0false
WikiParser.ometa(notparsed)falsetruefalse0false
WikiWidget.js(notparsed)falsetruefalse0false18633nullnulltruetruetrue
1true
null
null
null
nulltruetrue
lively.data.Wrapperfalsetruefalse0false
lively.data.Wrapper(extension)falsetruefalse0false
lively.data.Wrapper(extension)falsetruefalse0false
lively.data.Wrapper(extension)falsetruefalse0false
lively.data.Wrapper(extension)falsetruefalse0false
lively.scene.Nodefalsetruefalse0false
this.Node(extension)falsetruefalse0false
this.Node(extension)falsetruefalse0false
lively.scene.Shapefalsetruefalse0false
this.Shape(extension)falsetruefalse0false
this(extension)falsetruefalse0false
lively.scene.Rectanglefalsetruefalse0false
this.Rectangle(extension)falsetruefalse0false
lively.scene.Ellipsefalsetruefalse0false
this.Ellipse(extension)falsetruefalse0false
lively.scene.Polygonfalsetruefalse0false
this.Polygon(extension)falsetruefalse0false
lively.scene.Polylinefalsetruefalse0false
this.Polyline(extension)falsetruefalse0false
lively.scene.PathElementfalsetruefalse0false
lively.scene.PathElement(extension)falsetruefalse0false
lively.scene.MoveTofalsetruefalse0false
lively.scene.MoveTo(extension)falsetruefalse0false
lively.scene.LineTofalsetruefalse0false
lively.scene.LineTo(extension)falsetruefalse0false
lively.scene.HorizontalTofalsetruefalse0false
lively.scene.HorizontalTo(extension)falsetruefalse0false
lively.scene.VerticalTofalsetruefalse0false
lively.scene.VerticalTo(extension)falsetruefalse0false
lively.scene.CurveTofalsetruefalse0false
lively.scene.CurveTo(extension)falsetruefalse0false
lively.scene.QuadCurveTofalsetruefalse0false
lively.scene.QuadCurveTo(extension)falsetruefalse0false
lively.scene.BezierCurve2CtlTofalsetruefalse0false
lively.scene.BezierCurve2CtlTo(extension)falsetruefalse0false
lively.scene.BezierCurve1CtlTofalsetruefalse0false
lively.scene.BezierCurve1CtlTo(extension)falsetruefalse0false
lively.scene.ArcTofalsetruefalse0false
lively.scene.ArcTo(extension)falsetruefalse0false
lively.scene.ClosePathfalsetruefalse0false
lively.scene.ClosePath(extension)falsetruefalse0false
lively.scene.Pathfalsetruefalse0false
lively.scene.Path(extension)falsetruefalse0false
lively.scene.Groupfalsetruefalse0false
this.Group(extension)falsetruefalse0false
lively.scene.Imagefalsetruefalse0false
this.Image(extension)falsetruefalse0false
lively.scene.Clipfalsetruefalse0false
this.Clip(extension)falsetruefalse0false
lively.scene.Similitudefalsetruefalse0false
lively.scene.Transformfalsetruefalse0false
lively.scene.Rotatefalsetruefalse0false
lively.scene.Rotate(extension)falsetruefalse0false
lively.scene.Effectfalsetruefalse0false
lively.scene.GaussianBlurEffectfalsetruefalse0false
lively.scene.BlendEffectfalsetruefalse0false
lively.scene.ColorAdjustEffectfalsetruefalse0false
lively.scene.SaturateEffectfalsetruefalse0false
lively.scene.Textfalsetruefalse0false
lively.paint.Stopfalsetruefalse0false
this.Stop(extension)falsetruefalse0false
lively.paint.Gradientfalsetruefalse0false
lively.paint.LinearGradientfalsetruefalse0false
this.LinearGradient(extension)falsetruefalse0false
this.LinearGradient(extension)falsetruefalse0false
lively.paint.RadialGradientfalsetruefalse0false
this.RadialGradient(extension)falsetruefalse0false2170nullnulltruetruetrue
1true
null
null
null
nulltruetrue
documentation(proto)falsetruefalse0false
rawNode(proto)falsetruefalse0false
deserialize(proto)falsetruefalse0false
copyFrom(proto)falsetruefalse0false
copy(proto)falsetruefalse0false
getType(proto)falsetruefalse0false
newId(proto)falsetruefalse0false
id(proto)falsetruefalse0false
setId(proto)falsetruefalse0false
setDerivedId(proto)falsetruefalse0false
removeRawNode(proto)falsetruefalse0false
replaceRawNodeChildren(proto)falsetruefalse0false
toString(proto)falsetruefalse0false
inspect(proto)falsetruefalse0false
toMarkupString(proto)falsetruefalse0false
uri(proto)falsetruefalse0false
getLivelyTrait(proto)falsetruefalse0false
setLivelyTrait(proto)falsetruefalse0false
removeLivelyTrait(proto)falsetruefalse0false
getLengthTrait(proto)falsetruefalse0false
setLengthTrait(proto)falsetruefalse0false
getTrait(proto)falsetruefalse0false
setTrait(proto)falsetruefalse0false
removeTrait(proto)falsetruefalse0false
getDefsNode(proto)falsetruefalse0false
doNotSerialize(proto)falsetruefalse0false
isPropertyOnIgnoreList(proto)falsetruefalse0false
isPropertyOnIgnoreListInClassHierarchy(proto)falsetruefalse0false
prepareForSerialization(proto)falsetruefalse0false
appendHelperNode(proto)falsetruefalse0false
prepareArrayPropertyForSerialization(proto)falsetruefalse0false
prepareWrapperPropertyForSerialization(proto)falsetruefalse0false
prepareRelayPropertyForSerialization(proto)falsetruefalse0false
preparePropertyForSerialization(proto)falsetruefalse0false
reference(proto)falsetruefalse0false
dereference(proto)falsetruefalse0false
dictionary(proto)falsetruefalse0false
deserializeWidgetFromNode(proto)falsetruefalse0false
deserializeValueFromNode(proto)falsetruefalse0false
deserializeFieldFromNode(proto)falsetruefalse0false
deserializeRelayFromNode(proto)falsetruefalse0false
deserializeRecordFromNode(proto)falsetruefalse0false
deserializeArrayFromNode(proto)falsetruefalse0false
resolveUriToObject(proto)falsetruefalse0false217-1nullnullnulltruetruetrue
1true
null
null
null
nulltruetrue
20null
Object.subclass('lively.data.Wrapper',{documentation:"Awrapperaroundanativeobject,storedasrawNode",rawNode:null,deserialize:function(importer,rawNode){this.rawNode=rawNode;dbgOn(!rawNode);varid=rawNode.getAttribute("id");if(id)importer.addMapping(id,this);},copyFrom:function(copier,other){if(other.rawNode)this.rawNode=other.rawNode.cloneNode(true);},copy:function(copier){varmyClass=Class.forName(this.getType());returnnewmyClass(copier||Copier.marker,this);},getType:function(){varctor=this.constructor.getOriginal();if(ctor.type)returnctor.type;console.log("notypefor"+ctor);lively.lang.Execution.showStack();returnnull;},newId:(function(){//thismaybeaProblem,afterdeserializingandwhencopyandpasting...varwrapperCounter=0;returnfunction(optNewCounter){if(optNewCounter){wrapperCounter=optNewCounter;return;}returnMath.uuid?Math.uuid():++wrapperCounter;//souse(pseudo)uuidswhenavailable}})(),id:function(){dbgOn(!this.rawNode);returnthis.rawNode.getAttribute("id");},setId:function(value){varprev=this.id();//easyparsingifvalueisanint,justcallparseInt()this.rawNode.setAttribute("id",value+":"+this.getType());//thismayhappenautomaticallyanywaybysettingtheidpropertyreturnprev;},setDerivedId:function(origin){this.setId(origin.id().split(':')[0]);returnthis;},removeRawNode:function(){varparent=this.rawNode&&this.rawNode.parentNode;returnparent&&parent.removeChild(this.rawNode);},replaceRawNodeChildren:function(replacement){while(this.rawNode.firstChild)this.rawNode.removeChild(this.rawNode.firstChild);if(replacement)this.rawNode.appendChild(replacement);},toString:function(){try{return"#<"+this.getType()+":"+this.rawNode+">";}catch(err){return"#<toStringerror:"+err+">";}},inspect:function(){try{returnthis.toString()+"["+this.toMarkupString()+"]";}catch(err){return"#<inspecterror:"+err+">";}},toMarkupString:function(){//noteforwardreferencereturnExporter.stringify(this.rawNode);},uri:function(){returnlively.data.FragmentURI.fromString(this.id());},//convenienceattributeaccessgetLivelyTrait:function(name){returnthis.rawNode.getAttributeNS(Namespace.LIVELY,name);},//convenienceattributeaccesssetLivelyTrait:function(name,value){returnthis.rawNode.setAttributeNS(Namespace.LIVELY,name,value);},//convenienceattributeaccessremoveLivelyTrait:function(name){returnthis.rawNode.removeAttributeNS(Namespace.LIVELY,name);},getLengthTrait:function(name){returnlively.data.Length.parse(this.rawNode.getAttributeNS(null,name));},setLengthTrait:function(name,value){this.setTrait(name,value);},getTrait:function(name){returnthis.rawNode.getAttributeNS(null,name);},setTrait:function(name,value){returnthis.rawNode.setAttributeNS(null,name,String(value));},removeTrait:function(name){returnthis.rawNode.removeAttributeNS(null,name);},getDefsNode:function(){vardefNode=$A(this.rawNode.getElementsByTagName('defs')).detect(function(ea){if(ea==null){lively.lang.Execution.showStack();returnfalse;}returnea.parentNode===this.rawNode;},this);//createandappendonewhendefNodeisnotthereif(!defNode)defNode=this.rawNode.appendChild(NodeFactory.create('defs'));returndefNode;},doNotSerialize:['rawNode'],isPropertyOnIgnoreList:function(prop){returnthis.doNotSerialize.include(prop)||this.isPropertyOnIgnoreListInClassHierarchy(prop,this.constructor);},isPropertyOnIgnoreListInClassHierarchy:function(prop,klass){if(klass===Object)returnfalse;returnklass.prototype.doNotSerialize.include(prop)||this.isPropertyOnIgnoreListInClassHierarchy(prop,klass.superclass);},prepareForSerialization:function(extraNodes,optSystemDictionary){for(varpropinthis){if(!this.hasOwnProperty(prop))continue;if(this.isPropertyOnIgnoreList(prop))continue;varm=this[prop];if(m===this.constructor.prototype[prop])//savespacecontinue;this.preparePropertyForSerialization(prop,m,extraNodes,optSystemDictionary);}},appendHelperNode:function(node,extraNodes){try{extraNodes.push(this.rawNode.appendChild(node));}catch(er){thrower;}//console.log("appendHelperNode"+node.tagName+""+node.parentNode)node.isHelper=true;//whodeletestheextrawhitespaceafterthenodesarereloaded?//extraNodes.push(this.rawNode.appendChild(NodeFactory.createNL()));},prepareArrayPropertyForSerialization:function(prop,propValue,extraNodes,optSystemDictionary){if(prop==='submorphs')return;//we'lldealmanuallyvararr=LivelyNS.create("array",{name:prop});varabort=false;propValue.forEach(functioniter(elt){if(elt&&lively.data.Wrapper.isInstance(elt)){//FIXMEwhatifWrapperisamixin?//ifitemempty,don'tsetthereffieldvaritem=(elt&&elt.id())?LivelyNS.create("item",{ref:elt.id()}):LivelyNS.create("item");extraNodes.push(arr.appendChild(item));extraNodes.push(arr.appendChild(NodeFactory.createNL()));}else{varitem=Converter.encodeProperty(null,elt,true);if(item){extraNodes.push(arr.appendChild(item));extraNodes.push(arr.appendChild(NodeFactory.createNL()));}else{console.log("ERRORSerializingiteminarray"+prop+"of"+this)abort=true;return;}}},this);if(!abort){//console.assert($A(this.rawNode.getElementsByTagName("array")).select(function(ea){//returnea.getAttribute("name")==prop}).length==1,"ERROR:nodewith"+prop+"isalreadyinrawNode");this.appendHelperNode(arr,extraNodes);}},prepareWrapperPropertyForSerialization:function(prop,propValue,extraNodes,optSystemDictionary){if(prop==='owner')return;//we'lldealmanuallyif(propValueinstanceoflively.paint.Gradient||propValueinstanceoflively.scene.Image){return;//theseshouldsitindefsandbehandledbyrestoreDefs()}//console.log("serializingfieldname='%s',ref='%s'",prop,m.id(),m.getType());if(!propValue.rawNode){console.log("wha',norawnodeon"+propValue);}elseif(propValue.id()!=null){vardesc=LivelyNS.create("field",{name:prop,ref:propValue.id()});this.appendHelperNode(desc,extraNodes);;if(prop==="ownerWidget"){//console.log('recursingforfield'+prop);propValue.prepareForSerialization(extraNodes,optSystemDictionary);this.appendHelperNode(propValue.rawNode,extraNodes);}}},prepareRelayPropertyForSerialization:function(prop,propValue,extraNodes,optSystemDictionary){vardelegate=propValue.delegate;if(lively.data.Wrapper.isInstance(delegate)){//FIXME:betterinstanceofvardesc=LivelyNS.create("relay",{name:prop,ref:delegate.id()});Properties.forEachOwn(propValue.definition,function(key,value){varbinding=desc.appendChild(LivelyNS.create("binding"));//extraNodes.push(binding);binding.setAttributeNS(null,"formal",key);binding.setAttributeNS(null,"actual",value);});this.appendHelperNode(desc,extraNodes);}else{console.warn('unexpected:'+propValue+'sdelegateis'+delegate);}},preparePropertyForSerialization:function(prop,propValue,extraNodes,optSystemDictionary){//console.log("prepareproperty"+prop+":"+optSystemDictionary)if(propValueinstanceofFunction){return;}elseif(lively.data.Wrapper.isInstance(propValue)){this.prepareWrapperPropertyForSerialization(prop,propValue,extraNodes,optSystemDictionary)}elseif(propValueinstanceofRelay){this.prepareRelayPropertyForSerialization(prop,propValue,extraNodes,optSystemDictionary)}elseif(propValueinstanceofArray){this.prepareArrayPropertyForSerialization(prop,propValue,extraNodes,optSystemDictionary)}elseif(prop==='rawNode'||prop==='defs'){//necessarybecausenodesgetserializedreturn;}else{varnode=Converter.encodeProperty(prop,propValue);node&&this.appendHelperNode(node,extraNodes);;}},reference:function(){//console.log("reference"+this)if(!this.refcount){if(!this.id()){this.setId(this.newId());}this.dictionary().appendChild(this.rawNode);this.refcount=1;return;}this.refcount++;},dereference:function(){//console.log("dereference"+this)//sadly,whentheobjectowningthegradientisreclaimed,nobodywilltellustodereferenceif(this.refcount===undefined)thrownewError('sorry,undefined');this.refcount--;if(this.refcount==0){if(this.rawNode.parentNode)this.dictionary().removeChild(this.rawNode);}},dictionary:function(){if(lively.data.Wrapper.dictionary)returnlively.data.Wrapper.dictionary;if(lively.data.Wrapper.dictionary=Global.document.getElementById("SystemDictionary"))returnlively.data.Wrapper.dictionary;varcanvas=Global.document.getElementById("canvas");lively.data.Wrapper.dictionary=canvas.appendChild(NodeFactory.create("defs"));lively.data.Wrapper.dictionary.setAttribute("id","SystemDictionary");returnlively.data.Wrapper.dictionary;},deserializeWidgetFromNode:function(importer,node){vartype=lively.data.Wrapper.getEncodedType(node);if(!type)thrownewError("ErrorindeserializingWidget:nogetEncodedTypefor"+node);varklass=Class.forName(type);if(!klass)thrownewError("ErrorindeserializingWidget:"+type+",noclass");varwidget=newklass(importer,node);widget.restoreFromSubnodes(importer,node);returnwidget},deserializeValueFromNode:function(importer,node){varvalue=node.textContent;if(!value)returnnullif(value==='NaN')returnNaN;//JSONdoesn'tunserializesNaNvarfamily=LivelyNS.getAttribute(node,"family");if(family){varcls=Class.forName(family);if(!cls)thrownewError('unknowntype'+family);returncls.fromLiteral(JSON.unserialize(value),importer);}try{returnJSON.unserialize(value);}catch(e){console.log('Errorinlively.data.Wrapper.deserializeValueFromNode:');console.log(e+'wasthrownwhendeserializing:'+value);}},deserializeFieldFromNode:function(importer,node){varname=LivelyNS.getAttribute(node,"name");if(!name)thrownewError("couldnotdeserializefieldwithoutname");varref=LivelyNS.getAttribute(node,"ref");if(ref){importer.addPatchSite(this,name,ref);return}varisNode=node.getAttributeNS(null,'isNode');if(isNode!==''&&isNode!=null){//wehaveanormalnode,nothingtodeserializebutreassignvarrealNode=node.firstChild;node.removeChild(realNode);this[name]=realNode;this.addNonMorph(realNode);return}this[name]=this.deserializeValueFromNode(importer,node);},deserializeRelayFromNode:function(importer,node){varspec={};$A(node.getElementsByTagName("binding")).forEach(function(elt){varkey=elt.getAttributeNS(null,"formal");varvalue=elt.getAttributeNS(null,"actual");spec[key]=value;});varname=LivelyNS.getAttribute(node,"name");if(name){varrelay=this[name]=Relay.newInstance(spec,null);varref=LivelyNS.getAttribute(node,"ref");importer.addPatchSite(relay,"delegate",ref);}node.parentNode.removeChild(node);},deserializeRecordFromNode:function(importer,node){varspec=JSON.unserialize(node.getElementsByTagName("definition")[0].textContent);varRec=lively.data.DOMNodeRecord.prototype.create(spec);varmodel=newRec(importer,node);varid=node.getAttribute("id");if(id)importer.addMapping(id,model);this.actualModel=model;},deserializeArrayFromNode:function(importer,node){varname=LivelyNS.getAttribute(node,"name");this[name]=[];varindex=0;$A(node.getElementsByTagName("item")).forEach(function(elt){varref=LivelyNS.getAttribute(elt,"ref");if(ref){importer.addPatchSite(this,name,ref,index);}else{//rk3/22/10nodeinsteadofeltwasused,wasthatabug?this[name].push(this.deserializeValueFromNode(importer,elt));}index++;},this);},resolveUriToObject:function(uri){if(this.id()==uri)returnthis;returnnull}});\";\n\t\t} catch (err) {\n\t\t\treturn \"#\";\n\t\t}\n\t},\n\n\tinspect: function() {\n\t\ttry {\n\t\t\treturn this.toString() + \"[\" + this.toMarkupString() + \"]\";\n\t\t} catch (err) {\n\t\t\treturn \"#\";\n\t\t}\n\t},\n\n\ttoMarkupString: function() {\n\t\t// note forward reference\n\t\treturn Exporter.stringify(this.rawNode);\n\t},\n\n\turi: function() {\n\t\treturn lively.data.FragmentURI.fromString(this.id());\n\t},\n\n\t// convenience attribute access\n\tgetLivelyTrait: function(name) {\n\t\treturn this.rawNode.getAttributeNS(Namespace.LIVELY, name);\n\t},\n\n\t// convenience attribute access\n\tsetLivelyTrait: function(name, value) {\n\t\treturn this.rawNode.setAttributeNS(Namespace.LIVELY, name, value);\n\t},\n\n\t// convenience attribute access\n\tremoveLivelyTrait: function(name) {\n\t\treturn this.rawNode.removeAttributeNS(Namespace.LIVELY, name);\n\t},\n\n\tgetLengthTrait: function(name) {\n\t\treturn lively.data.Length.parse(this.rawNode.getAttributeNS(null, name));\n\t},\n\n\tsetLengthTrait: function(name, value) {\n\t\tthis.setTrait(name, value);\n\t},\n\n\tgetTrait: function(name) {\n\t\treturn this.rawNode.getAttributeNS(null, name);\n\t},\n\n\tsetTrait: function(name, value) {\n\t\treturn this.rawNode.setAttributeNS(null, name, String(value));\n\t},\n\n\tremoveTrait: function(name) {\n\t\treturn this.rawNode.removeAttributeNS(null, name);\n\t},\n\n\tgetDefsNode: function() {\n\t\tvar defNode = $A(this.rawNode.getElementsByTagName('defs')).detect(function(ea) {\n\t\t\tif (ea == null) {\n\t\t\t\tlively.lang.Execution.showStack();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn ea.parentNode === this.rawNode;\n\t\t}, this);\n\t\t// create and append one when defNode is not there\n\t\tif (!defNode)\n\t\t\tdefNode = this.rawNode.appendChild(NodeFactory.create('defs'));\n\t\treturn defNode;\n\t},\n\t\n\tdoNotSerialize: ['rawNode'],\n\n\tisPropertyOnIgnoreList: function(prop) {\n\t\treturn this.doNotSerialize.include(prop) || this.isPropertyOnIgnoreListInClassHierarchy(prop, this.constructor);\n\t},\n\n\tisPropertyOnIgnoreListInClassHierarchy: function(prop, klass) {\n\t\tif (klass === Object)\n\t\t\treturn false;\n\t\treturn klass.prototype.doNotSerialize.include(prop) || this.isPropertyOnIgnoreListInClassHierarchy(prop, klass.superclass);\n\t},\n\t\n\tprepareForSerialization: function(extraNodes, optSystemDictionary) {\n\t\tfor (var prop in this) {\n\t\t\tif (!this.hasOwnProperty(prop)) \n\t\t\t\tcontinue;\n\t\t\tif (this.isPropertyOnIgnoreList(prop))\n\t\t\t\tcontinue;\n\t\t\tvar m = this[prop];\n\t\t\tif (m === this.constructor.prototype[prop])\t // save space\n\t\t\t\tcontinue;\n\t\t\tthis.preparePropertyForSerialization(prop, m, extraNodes, optSystemDictionary);\n\t\t}\n\t},\n\n\tappendHelperNode: function(node, extraNodes) {\n\t\ttry {\n\t\t\textraNodes.push(this.rawNode.appendChild(node));\n\t\t} catch (er) { throw er;}\n\t\t// console.log(\"appendHelperNode \" + node.tagName + \" \" + node.parentNode)\n\t\tnode.isHelper = true;\n\t\t// who deletes the extra whitespace after the nodes are reloaded? \n\t\t// extraNodes.push(this.rawNode.appendChild(NodeFactory.createNL())); \n\t},\n\t\n\tprepareArrayPropertyForSerialization: function(prop, propValue, extraNodes, optSystemDictionary) {\n\t\tif (prop === 'submorphs')\n\t\t\treturn;\t // we'll deal manually\n\t\tvar arr = LivelyNS.create(\"array\", {name: prop});\n\t\tvar abort = false;\n\t\tpropValue.forEach(function iter(elt) {\n\t\t\tif (elt && lively.data.Wrapper.isInstance(elt)) { // FIXME what if Wrapper is a mixin?\n\t\t\t\t// if item empty, don't set the ref field\n\t\t\t\tvar item =\t(elt && elt.id()) ? LivelyNS.create(\"item\", {ref: elt.id()}) : LivelyNS.create(\"item\"); \n\t\t\t\textraNodes.push(arr.appendChild(item));\n\t\t\t\textraNodes.push(arr.appendChild(NodeFactory.createNL()));\n\t\t\t} else {\n\t\t\t\tvar item = Converter.encodeProperty(null, elt, true);\n\t\t\t\tif (item) {\n\t\t\t\t\textraNodes.push(arr.appendChild(item));\n\t\t\t\t\textraNodes.push(arr.appendChild(NodeFactory.createNL()));\n\t\t\t\t} else {\n\t\t\t\t\tconsole.log(\"ERROR Serializing item in array \" + prop + \" of \" + this)\n\t\t\t\t\tabort = true;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}, this);\n\t\tif (!abort) { \n\t\t\t//console.assert($A(this.rawNode.getElementsByTagName(\"array\")).select(function(ea){ \n\t\t\t//\t return ea.getAttribute(\"name\") == prop }).length == 1, \"ERROR: node with \" + prop + \" is already in raw Node\");\n\t\t\tthis.appendHelperNode(arr, extraNodes);\n\t\t}\t\n\t},\n\t\n\tprepareWrapperPropertyForSerialization: function(prop, propValue, extraNodes, optSystemDictionary) {\n\t\tif (prop === 'owner') \n\t\treturn; // we'll deal manually\n\t\tif (propValue instanceof lively.paint.Gradient || propValue\t instanceof lively.scene.Image) {\n\t\t\treturn; // these should sit in defs and be handled by restoreDefs() \n\t\t}\n\n\t\t//console.log(\"serializing field name='%s', ref='%s'\", prop, m.id(), m.getType());\n\t\tif (!propValue.rawNode) {\n\t\t\tconsole.log(\"wha', no raw node on \" + propValue);\n\t\t} else if (propValue.id() != null) {\n\t\t\tvar desc = LivelyNS.create(\"field\", {name: prop, ref: propValue.id()});\n\t\t\tthis.appendHelperNode(desc, extraNodes);;\n\t\t\tif (prop === \"ownerWidget\") {\n\t\t\t\t// console.log('recursing for field ' + prop);\n\t\t\t\tpropValue.prepareForSerialization(extraNodes, optSystemDictionary);\n\t\t\t\tthis.appendHelperNode(propValue.rawNode, extraNodes);\n\t\t\t}\n\t\t}\n\t},\n\t\n\tprepareRelayPropertyForSerialization: function(prop, propValue, extraNodes, optSystemDictionary) {\n\t\tvar delegate = propValue.delegate;\n\t\tif (lively.data.Wrapper.isInstance(delegate)) { // FIXME: better instanceof\n\t\t\tvar desc = LivelyNS.create(\"relay\", {name: prop, ref: delegate.id()});\n\t\t\tProperties.forEachOwn(propValue.definition, function(key, value) {\n\t\t\t\tvar binding = desc.appendChild(LivelyNS.create(\"binding\"));\n\t\t\t\t// extraNodes.push(binding); \n\t\t\t\tbinding.setAttributeNS(null, \"formal\", key);\n\t\t\t\tbinding.setAttributeNS(null, \"actual\", value);\n\t\t\t});\n\t\t\tthis.appendHelperNode(desc, extraNodes);\n\t\t} else {\n\t\t\tconsole.warn('unexpected: '+ propValue + 's delegate is ' + delegate);\n\t\t}\t\t\n\t},\n\n\tpreparePropertyForSerialization: function(prop, propValue, extraNodes, optSystemDictionary) {\n\t\t// console.log(\"prepare property \" + prop + \": \" + optSystemDictionary)\n\t\tif (propValue instanceof Function) {\n\t\t\treturn;\n\t\t} else if (lively.data.Wrapper.isInstance(propValue)) { \n\t\t\tthis.prepareWrapperPropertyForSerialization(prop, propValue, extraNodes, optSystemDictionary)\n\t\t} else if (propValue instanceof Relay) {\n\t\t\tthis.prepareRelayPropertyForSerialization(prop, propValue, extraNodes, optSystemDictionary)\n\t\t} else if (propValue instanceof Array) {\n\t\t\tthis.prepareArrayPropertyForSerialization(prop, propValue, extraNodes, optSystemDictionary) \n\t\t} else if (prop === 'rawNode' || prop === 'defs') { // necessary because nodes get serialized\n\t\t\treturn;\n\t\t} else {\n\t\t\tvar node = Converter.encodeProperty(prop, propValue);\n\t\t\tnode && this.appendHelperNode(node, extraNodes);;\n\t\t}\n\t},\n\n\treference: function() {\n\t\t// console.log(\"reference \" + this)\n\t\tif (!this.refcount) {\n\t\t\tif (!this.id()) {\n\t\t\t\tthis.setId(this.newId());\n\t\t\t}\n\t\t\tthis.dictionary().appendChild(this.rawNode);\n\t\t\tthis.refcount = 1; \n\t\t\treturn;\n\t\t}\n\t\tthis.refcount ++;\n\t},\n\n\tdereference: function() {\n\t\t// console.log(\"dereference \" + this)\n\t\t// sadly, when the object owning the gradient is reclaimed, nobody will tell us to dereference\n\t\tif (this.refcount === undefined) throw new Error('sorry, undefined');\n\t\tthis.refcount --;\n\t\tif (this.refcount == 0) {\n\t\t\tif (this.rawNode.parentNode) this.dictionary().removeChild(this.rawNode);\n\t\t}\n\t},\n\n\tdictionary: function() {\n\t\tif (lively.data.Wrapper.dictionary)\n\t\t\treturn\tlively.data.Wrapper.dictionary;\n\t\tif (lively.data.Wrapper.dictionary = Global.document.getElementById(\"SystemDictionary\"))\n\t\t\treturn lively.data.Wrapper.dictionary;\n\t\tvar canvas = Global.document.getElementById(\"canvas\");\n\t\tlively.data.Wrapper.dictionary = canvas.appendChild(NodeFactory.create(\"defs\"));\n\t\tlively.data.Wrapper.dictionary.setAttribute(\"id\", \"SystemDictionary\");\n\t\treturn lively.data.Wrapper.dictionary;\n\t},\n\t\n\tdeserializeWidgetFromNode: function(importer, node) {\n\t\tvar type = lively.data.Wrapper.getEncodedType(node);\n\t\tif (!type)\n\t\t\tthrow new Error(\"Error in deserializing Widget: no getEncodedType for \" + node);\n\t\tvar klass = Class.forName(type);\n\t\tif (!klass)\n\t\t\tthrow new Error(\"Error in deserializing Widget:\" + type + \", no class\");\n\n\t\tvar widget = new klass(importer, node);\n\t\twidget.restoreFromSubnodes(importer, node);\n\t\treturn widget\n\t},\n\t\n\tdeserializeValueFromNode: function(importer, node) {\n\t\tvar value = node.textContent;\n\t\tif (!value) return null\n\t\t\n\t\tif (value === 'NaN')\n\t\t\treturn\tNaN; // JSON doesn't unserializes NaN\n\n\t\tvar family = LivelyNS.getAttribute(node, \"family\");\n\t\tif (family) {\n\t\t\tvar cls = Class.forName(family);\n\t\t\tif (!cls) throw new Error('unknown type ' + family);\n\t\t\treturn cls.fromLiteral(JSON.unserialize(value), importer);\n\t\t}\n\t\t\t\n\t\ttry {\n\t\t\treturn JSON.unserialize(value);\n\t\t} catch (e) {\n\t\t\tconsole.log('Error in lively.data.Wrapper.deserializeValueFromNode:');\n\t\t\tconsole.log(e + ' was thrown when deserializing: ' + value);\n\t\t}\n\t},\n\t\t\n\tdeserializeFieldFromNode: function(importer, node) {\n\t\tvar name = LivelyNS.getAttribute(node, \"name\");\n\t\tif (!name)\n\t\t\tthrow new Error(\"could not deserialize field without name\");\n\t\t\n\t\tvar ref = LivelyNS.getAttribute(node, \"ref\");\n\t\tif (ref) {\n\t\t\timporter.addPatchSite(this, name, ref);\n\t\t\treturn\n\t\t}\n\t\t\n\t\tvar isNode = node.getAttributeNS(null, 'isNode');\n\t\tif (isNode !== '' && isNode != null) {\n\t\t\t// we have a normal node, nothing to deserialize but reassign\n\t\t\tvar realNode = node.firstChild;\n\t\t\tnode.removeChild(realNode);\n\t\t\tthis[name] = realNode;\n\t\t\tthis.addNonMorph(realNode);\n\t\t\treturn\n\t\t}\n\t\t\n\t\tthis[name] = this.deserializeValueFromNode(importer, node);\n\t},\n\n\tdeserializeRelayFromNode: function(importer, node) {\n\t var spec = {};\n\t\t$A(node.getElementsByTagName(\"binding\")).forEach(function(elt) {\n\t\t\tvar key = elt.getAttributeNS(null, \"formal\");\n\t\t\tvar value = elt.getAttributeNS(null, \"actual\");\n\t\t\tspec[key] = value;\n\t\t});\n\t\tvar name = LivelyNS.getAttribute(node, \"name\");\n\t\tif (name) {\n\t\t\tvar relay = this[name] = Relay.newInstance(spec, null);\n\t\t\tvar ref = LivelyNS.getAttribute(node, \"ref\");\n\t\t\timporter.addPatchSite(relay, \"delegate\", ref);\n\t\t}\n\t\tnode.parentNode.removeChild(node);\n\t},\n\t\n\tdeserializeRecordFromNode: function(importer, node) { \n\t\tvar spec = JSON.unserialize(node.getElementsByTagName(\"definition\")[0].textContent);\n\t\tvar Rec = lively.data.DOMNodeRecord.prototype.create(spec);\n\t\tvar model = new Rec(importer, node);\n\t\tvar id = node.getAttribute(\"id\");\n\t\tif (id) importer.addMapping(id, model); \n\t\tthis.actualModel = model;\n\t},\n\t\n\tdeserializeArrayFromNode: function(importer, node) {\n\t\tvar name = LivelyNS.getAttribute(node, \"name\");\n\t\tthis[name] = [];\n\t\tvar index = 0;\n\t\t$A(node.getElementsByTagName(\"item\")).forEach(function(elt) {\n\t\t\tvar ref = LivelyNS.getAttribute(elt, \"ref\");\n\t\t\tif (ref) {\n\t\t\t\timporter.addPatchSite(this, name, ref, index);\n\t\t\t} else {\n\t\t\t\t// rk 3/22/10 node instead of elt was used, was that a bug?\n\t\t\t\tthis[name].push(this.deserializeValueFromNode(importer, elt));\n\t\t\t}\n\t\t\tindex ++;\n\t\t}, this);\n\t},\n\n\tresolveUriToObject: function(uri) {\n\t\tif (this.id() == uri)\n\t\t\treturn this;\n\t\treturn null\n\t}\n\n});\n"]]>406truetrue2000000\";\n\t\t} catch (err) {\n\t\t\treturn \"#\";\n\t\t}\n\t},\n\n\tinspect: function() {\n\t\ttry {\n\t\t\treturn this.toString() + \"[\" + this.toMarkupString() + \"]\";\n\t\t} catch (err) {\n\t\t\treturn \"#\";\n\t\t}\n\t},\n\n\ttoMarkupString: function() {\n\t\t// note forward reference\n\t\treturn Exporter.stringify(this.rawNode);\n\t},\n\n\turi: function() {\n\t\treturn lively.data.FragmentURI.fromString(this.id());\n\t},\n\n\t// convenience attribute access\n\tgetLivelyTrait: function(name) {\n\t\treturn this.rawNode.getAttributeNS(Namespace.LIVELY, name);\n\t},\n\n\t// convenience attribute access\n\tsetLivelyTrait: function(name, value) {\n\t\treturn this.rawNode.setAttributeNS(Namespace.LIVELY, name, value);\n\t},\n\n\t// convenience attribute access\n\tremoveLivelyTrait: function(name) {\n\t\treturn this.rawNode.removeAttributeNS(Namespace.LIVELY, name);\n\t},\n\n\tgetLengthTrait: function(name) {\n\t\treturn lively.data.Length.parse(this.rawNode.getAttributeNS(null, name));\n\t},\n\n\tsetLengthTrait: function(name, value) {\n\t\tthis.setTrait(name, value);\n\t},\n\n\tgetTrait: function(name) {\n\t\treturn this.rawNode.getAttributeNS(null, name);\n\t},\n\n\tsetTrait: function(name, value) {\n\t\treturn this.rawNode.setAttributeNS(null, name, String(value));\n\t},\n\n\tremoveTrait: function(name) {\n\t\treturn this.rawNode.removeAttributeNS(null, name);\n\t},\n\n\tgetDefsNode: function() {\n\t\tvar defNode = $A(this.rawNode.getElementsByTagName('defs')).detect(function(ea) {\n\t\t\tif (ea == null) {\n\t\t\t\tlively.lang.Execution.showStack();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn ea.parentNode === this.rawNode;\n\t\t}, this);\n\t\t// create and append one when defNode is not there\n\t\tif (!defNode)\n\t\t\tdefNode = this.rawNode.appendChild(NodeFactory.create('defs'));\n\t\treturn defNode;\n\t},\n\t\n\tdoNotSerialize: ['rawNode'],\n\n\tisPropertyOnIgnoreList: function(prop) {\n\t\treturn this.doNotSerialize.include(prop) || this.isPropertyOnIgnoreListInClassHierarchy(prop, this.constructor);\n\t},\n\n\tisPropertyOnIgnoreListInClassHierarchy: function(prop, klass) {\n\t\tif (klass === Object)\n\t\t\treturn false;\n\t\treturn klass.prototype.doNotSerialize.include(prop) || this.isPropertyOnIgnoreListInClassHierarchy(prop, klass.superclass);\n\t},\n\t\n\tprepareForSerialization: function(extraNodes, optSystemDictionary) {\n\t\tfor (var prop in this) {\n\t\t\tif (!this.hasOwnProperty(prop)) \n\t\t\t\tcontinue;\n\t\t\tif (this.isPropertyOnIgnoreList(prop))\n\t\t\t\tcontinue;\n\t\t\tvar m = this[prop];\n\t\t\tif (m === this.constructor.prototype[prop])\t // save space\n\t\t\t\tcontinue;\n\t\t\tthis.preparePropertyForSerialization(prop, m, extraNodes, optSystemDictionary);\n\t\t}\n\t},\n\n\tappendHelperNode: function(node, extraNodes) {\n\t\ttry {\n\t\t\textraNodes.push(this.rawNode.appendChild(node));\n\t\t} catch (er) { throw er;}\n\t\t// console.log(\"appendHelperNode \" + node.tagName + \" \" + node.parentNode)\n\t\tnode.isHelper = true;\n\t\t// who deletes the extra whitespace after the nodes are reloaded? \n\t\t// extraNodes.push(this.rawNode.appendChild(NodeFactory.createNL())); \n\t},\n\t\n\tprepareArrayPropertyForSerialization: function(prop, propValue, extraNodes, optSystemDictionary) {\n\t\tif (prop === 'submorphs')\n\t\t\treturn;\t // we'll deal manually\n\t\tvar arr = LivelyNS.create(\"array\", {name: prop});\n\t\tvar abort = false;\n\t\tpropValue.forEach(function iter(elt) {\n\t\t\tif (elt && lively.data.Wrapper.isInstance(elt)) { // FIXME what if Wrapper is a mixin?\n\t\t\t\t// if item empty, don't set the ref field\n\t\t\t\tvar item =\t(elt && elt.id()) ? LivelyNS.create(\"item\", {ref: elt.id()}) : LivelyNS.create(\"item\"); \n\t\t\t\textraNodes.push(arr.appendChild(item));\n\t\t\t\textraNodes.push(arr.appendChild(NodeFactory.createNL()));\n\t\t\t} else {\n\t\t\t\tvar item = Converter.encodeProperty(null, elt, true);\n\t\t\t\tif (item) {\n\t\t\t\t\textraNodes.push(arr.appendChild(item));\n\t\t\t\t\textraNodes.push(arr.appendChild(NodeFactory.createNL()));\n\t\t\t\t} else {\n\t\t\t\t\tconsole.log(\"ERROR Serializing item in array \" + prop + \" of \" + this)\n\t\t\t\t\tabort = true;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}, this);\n\t\tif (!abort) { \n\t\t\t//console.assert($A(this.rawNode.getElementsByTagName(\"array\")).select(function(ea){ \n\t\t\t//\t return ea.getAttribute(\"name\") == prop }).length == 1, \"ERROR: node with \" + prop + \" is already in raw Node\");\n\t\t\tthis.appendHelperNode(arr, extraNodes);\n\t\t}\t\n\t},\n\t\n\tprepareWrapperPropertyForSerialization: function(prop, propValue, extraNodes, optSystemDictionary) {\n\t\tif (prop === 'owner') \n\t\treturn; // we'll deal manually\n\t\tif (propValue instanceof lively.paint.Gradient || propValue\t instanceof lively.scene.Image) {\n\t\t\treturn; // these should sit in defs and be handled by restoreDefs() \n\t\t}\n\n\t\t//console.log(\"serializing field name='%s', ref='%s'\", prop, m.id(), m.getType());\n\t\tif (!propValue.rawNode) {\n\t\t\tconsole.log(\"wha', no raw node on \" + propValue);\n\t\t} else if (propValue.id() != null) {\n\t\t\tvar desc = LivelyNS.create(\"field\", {name: prop, ref: propValue.id()});\n\t\t\tthis.appendHelperNode(desc, extraNodes);;\n\t\t\tif (prop === \"ownerWidget\") {\n\t\t\t\t// console.log('recursing for field ' + prop);\n\t\t\t\tpropValue.prepareForSerialization(extraNodes, optSystemDictionary);\n\t\t\t\tthis.appendHelperNode(propValue.rawNode, extraNodes);\n\t\t\t}\n\t\t}\n\t},\n\t\n\tprepareRelayPropertyForSerialization: function(prop, propValue, extraNodes, optSystemDictionary) {\n\t\tvar delegate = propValue.delegate;\n\t\tif (lively.data.Wrapper.isInstance(delegate)) { // FIXME: better instanceof\n\t\t\tvar desc = LivelyNS.create(\"relay\", {name: prop, ref: delegate.id()});\n\t\t\tProperties.forEachOwn(propValue.definition, function(key, value) {\n\t\t\t\tvar binding = desc.appendChild(LivelyNS.create(\"binding\"));\n\t\t\t\t// extraNodes.push(binding); \n\t\t\t\tbinding.setAttributeNS(null, \"formal\", key);\n\t\t\t\tbinding.setAttributeNS(null, \"actual\", value);\n\t\t\t});\n\t\t\tthis.appendHelperNode(desc, extraNodes);\n\t\t} else {\n\t\t\tconsole.warn('unexpected: '+ propValue + 's delegate is ' + delegate);\n\t\t}\t\t\n\t},\n\n\tpreparePropertyForSerialization: function(prop, propValue, extraNodes, optSystemDictionary) {\n\t\t// console.log(\"prepare property \" + prop + \": \" + optSystemDictionary)\n\t\tif (propValue instanceof Function) {\n\t\t\treturn;\n\t\t} else if (lively.data.Wrapper.isInstance(propValue)) { \n\t\t\tthis.prepareWrapperPropertyForSerialization(prop, propValue, extraNodes, optSystemDictionary)\n\t\t} else if (propValue instanceof Relay) {\n\t\t\tthis.prepareRelayPropertyForSerialization(prop, propValue, extraNodes, optSystemDictionary)\n\t\t} else if (propValue instanceof Array) {\n\t\t\tthis.prepareArrayPropertyForSerialization(prop, propValue, extraNodes, optSystemDictionary) \n\t\t} else if (prop === 'rawNode' || prop === 'defs') { // necessary because nodes get serialized\n\t\t\treturn;\n\t\t} else {\n\t\t\tvar node = Converter.encodeProperty(prop, propValue);\n\t\t\tnode && this.appendHelperNode(node, extraNodes);;\n\t\t}\n\t},\n\n\treference: function() {\n\t\t// console.log(\"reference \" + this)\n\t\tif (!this.refcount) {\n\t\t\tif (!this.id()) {\n\t\t\t\tthis.setId(this.newId());\n\t\t\t}\n\t\t\tthis.dictionary().appendChild(this.rawNode);\n\t\t\tthis.refcount = 1; \n\t\t\treturn;\n\t\t}\n\t\tthis.refcount ++;\n\t},\n\n\tdereference: function() {\n\t\t// console.log(\"dereference \" + this)\n\t\t// sadly, when the object owning the gradient is reclaimed, nobody will tell us to dereference\n\t\tif (this.refcount === undefined) throw new Error('sorry, undefined');\n\t\tthis.refcount --;\n\t\tif (this.refcount == 0) {\n\t\t\tif (this.rawNode.parentNode) this.dictionary().removeChild(this.rawNode);\n\t\t}\n\t},\n\n\tdictionary: function() {\n\t\tif (lively.data.Wrapper.dictionary)\n\t\t\treturn\tlively.data.Wrapper.dictionary;\n\t\tif (lively.data.Wrapper.dictionary = Global.document.getElementById(\"SystemDictionary\"))\n\t\t\treturn lively.data.Wrapper.dictionary;\n\t\tvar canvas = Global.document.getElementById(\"canvas\");\n\t\tlively.data.Wrapper.dictionary = canvas.appendChild(NodeFactory.create(\"defs\"));\n\t\tlively.data.Wrapper.dictionary.setAttribute(\"id\", \"SystemDictionary\");\n\t\treturn lively.data.Wrapper.dictionary;\n\t},\n\t\n\tdeserializeWidgetFromNode: function(importer, node) {\n\t\tvar type = lively.data.Wrapper.getEncodedType(node);\n\t\tif (!type)\n\t\t\tthrow new Error(\"Error in deserializing Widget: no getEncodedType for \" + node);\n\t\tvar klass = Class.forName(type);\n\t\tif (!klass)\n\t\t\tthrow new Error(\"Error in deserializing Widget:\" + type + \", no class\");\n\n\t\tvar widget = new klass(importer, node);\n\t\twidget.restoreFromSubnodes(importer, node);\n\t\treturn widget\n\t},\n\t\n\tdeserializeValueFromNode: function(importer, node) {\n\t\tvar value = node.textContent;\n\t\tif (!value) return null\n\t\t\n\t\tif (value === 'NaN')\n\t\t\treturn\tNaN; // JSON doesn't unserializes NaN\n\n\t\tvar family = LivelyNS.getAttribute(node, \"family\");\n\t\tif (family) {\n\t\t\tvar cls = Class.forName(family);\n\t\t\tif (!cls) throw new Error('unknown type ' + family);\n\t\t\treturn cls.fromLiteral(JSON.unserialize(value), importer);\n\t\t}\n\t\t\t\n\t\ttry {\n\t\t\treturn JSON.unserialize(value);\n\t\t} catch (e) {\n\t\t\tconsole.log('Error in lively.data.Wrapper.deserializeValueFromNode:');\n\t\t\tconsole.log(e + ' was thrown when deserializing: ' + value);\n\t\t}\n\t},\n\t\t\n\tdeserializeFieldFromNode: function(importer, node) {\n\t\tvar name = LivelyNS.getAttribute(node, \"name\");\n\t\tif (!name)\n\t\t\tthrow new Error(\"could not deserialize field without name\");\n\t\t\n\t\tvar ref = LivelyNS.getAttribute(node, \"ref\");\n\t\tif (ref) {\n\t\t\timporter.addPatchSite(this, name, ref);\n\t\t\treturn\n\t\t}\n\t\t\n\t\tvar isNode = node.getAttributeNS(null, 'isNode');\n\t\tif (isNode !== '' && isNode != null) {\n\t\t\t// we have a normal node, nothing to deserialize but reassign\n\t\t\tvar realNode = node.firstChild;\n\t\t\tnode.removeChild(realNode);\n\t\t\tthis[name] = realNode;\n\t\t\tthis.addNonMorph(realNode);\n\t\t\treturn\n\t\t}\n\t\t\n\t\tthis[name] = this.deserializeValueFromNode(importer, node);\n\t},\n\n\tdeserializeRelayFromNode: function(importer, node) {\n\t var spec = {};\n\t\t$A(node.getElementsByTagName(\"binding\")).forEach(function(elt) {\n\t\t\tvar key = elt.getAttributeNS(null, \"formal\");\n\t\t\tvar value = elt.getAttributeNS(null, \"actual\");\n\t\t\tspec[key] = value;\n\t\t});\n\t\tvar name = LivelyNS.getAttribute(node, \"name\");\n\t\tif (name) {\n\t\t\tvar relay = this[name] = Relay.newInstance(spec, null);\n\t\t\tvar ref = LivelyNS.getAttribute(node, \"ref\");\n\t\t\timporter.addPatchSite(relay, \"delegate\", ref);\n\t\t}\n\t\tnode.parentNode.removeChild(node);\n\t},\n\t\n\tdeserializeRecordFromNode: function(importer, node) { \n\t\tvar spec = JSON.unserialize(node.getElementsByTagName(\"definition\")[0].textContent);\n\t\tvar Rec = lively.data.DOMNodeRecord.prototype.create(spec);\n\t\tvar model = new Rec(importer, node);\n\t\tvar id = node.getAttribute(\"id\");\n\t\tif (id) importer.addMapping(id, model); \n\t\tthis.actualModel = model;\n\t},\n\t\n\tdeserializeArrayFromNode: function(importer, node) {\n\t\tvar name = LivelyNS.getAttribute(node, \"name\");\n\t\tthis[name] = [];\n\t\tvar index = 0;\n\t\t$A(node.getElementsByTagName(\"item\")).forEach(function(elt) {\n\t\t\tvar ref = LivelyNS.getAttribute(elt, \"ref\");\n\t\t\tif (ref) {\n\t\t\t\timporter.addPatchSite(this, name, ref, index);\n\t\t\t} else {\n\t\t\t\t// rk 3/22/10 node instead of elt was used, was that a bug?\n\t\t\t\tthis[name].push(this.deserializeValueFromNode(importer, elt));\n\t\t\t}\n\t\t\tindex ++;\n\t\t}, this);\n\t},\n\n\tresolveUriToObject: function(uri) {\n\t\tif (this.id() == uri)\n\t\t\treturn this;\n\t\treturn null\n\t}\n\n});\n"]]>truetrue
1truetruetrue
20null
truetruetruetrue
1truetruetrue
Addmodulefalsenullfalsetrue
Loadallfalsenullfalsetrue
LineNofalsenullfalsetrue
Refreshfalsenullfalsetrue
Evalonfalsenullfalsetrue
Sortfalsenullfalsetrue
Viewas...falsenullfalse
truetrue
nullfalsenullnullnullnullfalse
nullfalsetruenullfalse
Core.js:Morph(extension):addAllHandles(proto)falsenullfalse
false
false
falsenullfalse
http://www.lively-kernel.org/repository/webwerkstatt/lively/truetruetruetruetrue
truetrue
1truetruetrue
codebasefalsenullfalsetrue
localfalsenullfalsetrue
Base.jsfalsetruefalse0false
bindings.js(notparsed)falsetruefalse0false
CanvasExpt.js(notparsed)falsetruefalse0false
ChangeSet.js(notparsed)falsetruefalse0false
Connector.js(notparsed)falsetruefalse0false
Contributions.js(notparsed)falsetruefalse0false
Core.jsfalsetruefalse0false
Data.jsfalsetruefalse0false
defaultconfig.js(notparsed)falsetruefalse0false
demofx.js(notparsed)falsetruefalse0false
EmuDom.js(notparsed)falsetruefalse0false
Examples.js(notparsed)falsetruefalse0false
Fabrik.js(notparsed)falsetruefalse0false
FileUploadWidget.js(notparsed)falsetruefalse0false
Graffle.js(notparsed)falsetruefalse0false
GridLayout.js(notparsed)falsetruefalse0false
Helper.js(notparsed)falsetruefalse0false
ide.js(notparsed)falsetruefalse0false
JSON.js(notparsed)falsetruefalse0false
lk-js-parser.ometa(notparsed)falsetruefalse0false
LKFileParser.js(notparsed)falsetruefalse0false
LKFileParser.ometa(notparsed)falsetruefalse0false
LKWiki.js(notparsed)falsetruefalse0false
Localcodefalsetruefalse0false
localconfig.js(notparsed)falsetruefalse0false
Main.js(notparsed)falsetruefalse0false
miniprototype.js(notparsed)falsetruefalse0false
Network.js(notparsed)falsetruefalse0false
obsolete.js(notparsed)falsetruefalse0false
Ometa.js(notparsed)falsetruefalse0false
phone.js(notparsed)falsetruefalse0false
Presentation.js(notparsed)falsetruefalse0false
rhino-compat.js(notparsed)falsetruefalse0false
scene.jsfalsetruefalse0false
Serialization.js(notparsed)falsetruefalse0false
simpleMain.js(notparsed)falsetruefalse0false
SmalltalkParser.js(notparsed)falsetruefalse0false
SmalltalkParser.ometa(notparsed)falsetruefalse0false
SmalltalkParserSupport.js(notparsed)falsetruefalse0false
Storage.js(notparsed)falsetruefalse0false
Styles.js(notparsed)falsetruefalse0false
TestFramework.js(notparsed)falsetruefalse0false
TestRunnerExtensions.js(notparsed)falsetruefalse0false
Text.js(notparsed)falsetruefalse0false
TileScripting.js(notparsed)falsetruefalse0false
Tools.js(notparsed)falsetruefalse0false
TouchSupport.js(notparsed)falsetruefalse0false
Undo.js(notparsed)falsetruefalse0false
WebPIM.js(notparsed)falsetruefalse0false
Widgets.js(notparsed)falsetruefalse0false
WikiParser.js(notparsed)falsetruefalse0false
WikiParser.ometa(notparsed)falsetruefalse0false
WikiWidget.js(notparsed)falsetruefalse0false1866nullnulltruefalsenullnulltruetrue
1true
null
null
null
nulltruetrue
ScriptLoaderfalsetruefalse0false
Global(extension)falsetruefalse0false
Global.window(extension)falsetruefalse0false
Exporterfalsetruefalse0false
Exporter(extension)falsetruefalse0false
Copierfalsetruefalse0false
Importerfalsetruefalse0false
MouseHandlerForDraggingfalsetruefalse0false
MouseHandlerForRelayfalsetruefalse0false
Morphfalsetruefalse0false
Morph(extension)falsetruefalse0false
Morph(extension)falsetruefalse0false
Morph(extension)falsetruefalse0false
Morph(extension)falsetruefalse0false
Morph(extension)falsetruefalse0false
Morph(extension)falsetruefalse0false
LayoutManagerfalsetruefalse0false
HorizontalLayoutfalsetruefalse0false
VerticalLayoutfalsetruefalse0false
Morph(extension)falsetruefalse0false
Morph(extension)falsetruefalse0false
Morph(extension)falsetruefalse0false
Morph(extension)falsetruefalse0false
Morph(extension)falsetruefalse0false
Morph(extension)falsetruefalse0false
Morph(extension)falsetruefalse0false
PseudoMorphfalsetruefalse0false
Invocationfalsetruefalse0false
SchedulableActionfalsetruefalse0false
Morph(extension)falsetruefalse0false
Morph(extension)falsetruefalse0false
Morph(extension)falsetruefalse0false
Morph(extension)falsetruefalse0false
Viewfalsetruefalse0false
Modelfalsetruefalse0false
ModelPlugfalsetruefalse0false
SyntheticModelfalsetruefalse0false
Morph(extension)falsetruefalse0false
PasteUpMorphfalsetruefalse0false
WorldMorphfalsetruefalse0false
WorldMorph(extension)falsetruefalse0false
WorldMorph(extension)falsetruefalse0false
WorldMorph(extension)falsetruefalse0false
HandMorphfalsetruefalse0false
WorldMorph(extension)falsetruefalse0false
LinkMorphfalsetruefalse0false
ExternalLinkMorphfalsetruefalse0false
Morph(extension)falsetruefalse0false
Morph(extension)falsetruefalse0false
HandMorph(extension)falsetruefalse0false
BoxMorphfalsetruefalse0false
ContainerMorphfalsetruefalse0false
ClipboardCopierfalsetruefalse0false21725nullnulltruefalsenullnulltruetrue
1true
null
null
null
nulltruetrue
checkForControlPointNear(proto)falsetruefalse0false
addAllHandles(proto)falsetruefalse0false
hasHandles(proto)falsetruefalse0false
removeAllHandlesExcept(proto)falsetruefalse0false
makeHandle(proto)falsetruefalse0false
copySubmorphsOnGrab(proto)falsetruefalse0false
suppressGrabbing(proto)falsetruefalse0false
okToBeGrabbedBy(proto)falsetruefalse0false
editMenuItems(proto)falsetruefalse0false
showMorphMenu(proto)falsetruefalse0false
morphMenu(proto)falsetruefalse0false
subMenuItems(proto)falsetruefalse0false
showPieMenu(proto)falsetruefalse0false
dragMe(proto)falsetruefalse0false
putMeInAWindow(proto)falsetruefalse0false
putMeInATab(proto)falsetruefalse0false
putMeInTheWorld(proto)falsetruefalse0false
immediateContainer(proto)falsetruefalse0false
windowContent(proto)falsetruefalse0false
windowTitle(proto)falsetruefalse0false
toggleDnD(proto)falsetruefalse0false
openDnD(proto)falsetruefalse0false
closeDnD(proto)falsetruefalse0false
closeAllToDnD(proto)falsetruefalse0false
openAllToDnD(proto)falsetruefalse0false
dropMeOnMorph(proto)falsetruefalse0false
pickMeUp(proto)falsetruefalse0false
notify(proto)falsetruefalse0false
showOwnerChain(proto)falsetruefalse0false
copyToHand(proto)falsetruefalse0false
shadowCopy(proto)falsetruefalse0false
morphToGrabOrReceiveDroppingMorph(proto)falsetruefalse0false
morphToGrabOrReceive(proto)falsetruefalse0false
morphToReceiveEvent(proto)falsetruefalse0false
ownerChain(proto)falsetruefalse0false
acceptsDropping(proto)falsetruefalse0false2171nullnulltruefalsenullnulltruetrue
1true
null
null
null
nulltruetrue
20null
addAllHandles:function(evt){if(this.suppressHandles)returnfalse;//disabledif(this.owner==null)returnfalse;//can'treshapetheworldvarpartNames=this.shape.allPartNames();//Arrayofnamefor(vari=0;i<partNames.length;i++){varloc=this.shape.partPosition(partNames[i]);varhandle=this.makeHandle(loc,partNames[i],evt);handle.mode='reshape';handle.showingAllHandles=true;handle.rollover=false;handle.isEpimorph=false;//makeboundsgrowsofeelsclickoutsidetargetthis.addMorph(handle);}if(evt.hand.mouseFocusinstanceofHandleMorph)evt.hand.mouseFocus.remove();},14truetrue2000000truetrue
1truetruetrue
20null
truetruetruetrue
1truetruetrue
Addmodulefalsenullfalsetrue
Loadallfalsenullfalsetrue
LineNofalsenullfalsetrue
Refreshfalsenullfalsetrue
Evalonfalsenullfalsetrue
Sortfalsenullfalsetrue
Viewas...falsenullfalsetrue
classesfalsenullfalsetruetruetrue
functionsfalsenullfalsetruetruetrue
objectsfalsenullfalsetruetruetrue
truetrue
nullfalsenullnullnullnullfalse
http://www.lively-kernel.org/repository/webwerkstatt/lively/truetruetruetruetrue
falsetruetruefalse
false1truefalsetruetruefalse
codebasefalsenullfalsefalsetrue
falsenull
localfalsenullfalsefalsetrue
false
FileUploadWidget.js(notparsed)falsetruefalse0false
Widgets.jsfalsetruefalse0false
WikiWidget.js(notparsed)falsetruefalse0false1861nullnulltruefalsefalsenullnulltruetruefalse
false1truefalse
nullfalse
nullfalse
nullfalse
nullfalsefalsetruetruefalse
ButtonMorphfalsetruefalse0false
ButtonBehaviorMorphfalsetruefalse0false
ScriptableButtonMorphfalsetruefalse0false
ImageMorphfalsetruefalse0false
ImageButtonMorphfalsetruefalse0false
ClipMorphfalsetruefalse0false
HandleMorphfalsetruefalse0false
SelectionMorphfalsetruefalse0false
PanelMorphfalsetruefalse0false
PanelMorph(extension)falsetruefalse0false
CheapListMorphfalsetruefalse0false
TextListMorphfalsetruefalse0false
ListMorphfalsetruefalse0false
DragWrapperfalsetruefalse0false
DragnDropListMorphfalsetruefalse0false
Morph(extension)falsetruefalse0false
FilterableListMorphfalsetruefalse0false
MenuItemfalsetruefalse0false
SubMenuItemfalsetruefalse0false
MenuMorphfalsetruefalse0false
SliderMorphfalsetruefalse0false
ScrollPanefalsetruefalse0false
ColorPickerMorphfalsetruefalse0false
XenoMorphfalsetruefalse0false
VideoMorphfalsetruefalse0false
VideoMorph(extension)falsetruefalse0false
WidgetModelfalsetruefalse0false
Widgetfalsetruefalse0false
Dialogfalsetruefalse0false
ConfirmDialogfalsetruefalse0false
PromptDialogfalsetruefalse0false
ConsoleWidgetfalsetruefalse0false
XenoBrowserWidgetfalsetruefalse0false
TitleBarMorphfalsetruefalse0false
TitleTabMorphfalsetruefalse0false
WindowControlMorphfalsetruefalse0false
StatusBarMorphfalsetruefalse0false
WindowMorphfalsetruefalse0false
Morph(extension)falsetruefalse0false
TabbedPanelMorphfalsetruefalse0false
PieMenuMorphfalsetruefalse0false
PieMenuMorph(extension)falsetruefalse0false
ArrowHeadMorphfalsetruefalse0false
ConnectorMorphfalsetruefalse0false
NodeMorphfalsetruefalse0false
NodeMorph(extension)falsetruefalse0false
NodeEnergySliderfalsetruefalse0false
MarkerMorphMouseHandlerfalsetruefalse0false
MarkerMorphfalsetruefalse0false
ProgressBarMorphfalsetruefalse0false
PromptDialogMorphfalsetruefalse0false
PromptDialogMorphExampleClientMorphfalsetruefalse0false
PromptDialogMorph(extension)falsetruefalse0false
HorizontalDividerfalsetruefalse0false
StatusMessageContainerfalsetruefalse0false
ScaleMorphfalsetruefalse0false2176nullnulltruefalsefalsenullnulltruetruefalse
false1truefalse
nullfalse
nullfalse
nullfalse
nullfalsefalsetruetruefalse
style(proto)falsetruefalse0false
controlHelpText(proto)falsetruefalse0false
circleHelpText(proto)falsetruefalse0false
maxHelpCount(proto)falsetruefalse0false
helpCount(proto)falsetruefalse0false
isEpimorph(proto)falsetruefalse0false
initialize(proto)falsetruefalse0false
getHelpText(proto)falsetruefalse0false
showHelp(proto)falsetruefalse0false
okToDuplicate(proto)falsetruefalse0false
handlesMouseDown(proto)falsetruefalse0false
onMouseDown(proto)falsetruefalse0false
onMouseMove(proto)falsetruefalse0false
onMouseUp(proto)falsetruefalse0false
handleReshape(proto)falsetruefalse0false
inspect(proto)falsetruefalse0false
scaleFor(proto)falsetruefalse0false
normalize(proto)falsetruefalse0false21712nullnulltruefalsefalsenullnulltruetruefalse
false1truefalse
nullfalse
nullfalse
nullfalse
nullfalsefalsetruetruefalse
20nullfalse
onMouseMove:function(evt){if(!evt.mouseButtonPressed){if(this.showingAllHandles)return;//Showingallhandles;justletmouserolloverif(this.rollover){//Mouseup:Removehandleifmousedriftsawayif(this.owner&&!this.bounds().expandBy(5).containsPoint(this.owner.localize(evt.mousePoint))){evt.hand.setMouseFocus(null);this.hideHelp();this.remove();}return;}}if(!this.owner){console.warn("Handle"+this+"hasnoownerinonMouseMove!");return;}//console.log("handlemove");//Whendragged,Idragthedesignatedcontrolpointofmytargetthis.align(this.bounds().center(),this.owner.localize(evt.mousePoint));varp0=evt.hand.lastMouseDownPoint;//inworldcoordsvarp1=evt.mousePoint;if(!this.initialScale)this.initialScale=this.targetMorph.getScale();if(!this.initialRotation)this.initialRotation=this.targetMorph.getRotation();varctr=this.targetMorph.owner.worldPoint(this.targetMorph.origin);//originforrotationandscalingvarv1=p1.subPt(ctr);//vectorfromoriginnowvarv0=p0.subPt(ctr);//vectorfromoriginatmousedownvard=p1.dist(p0);//distfrommousedownswitch(this.mode){//NotemodeissetinmouseDowncase'scale':varratio=v1.r()/v0.r();ratio=Math.max(0.1,Math.min(10,ratio));this.targetMorph.setScale(this.initialScale*ratio);break;case'rotate':this.targetMorph.setRotation(this.initialRotation+v1.theta()-v0.theta());break;case'borderWidth':this.targetMorph.setBorderWidth(Math.max(0,Math.floor(d/3)/2),true);break;case'reshape':this.handleReshape(this.targetMorph.reshape(this.partName,this.targetMorph.localize(evt.point()),false));break;}},42truetrue2000000falsetruetruefalse
false1truefalsenulltruetruefalse
20nullfalse
truetruefalsetruetruefalse
false1truefalsetruetruefalse
Addmodulefalsenullfalsefalsetruefalse
Loadallfalsenullfalsefalsetruefalse
LineNofalsenullfalsefalsetruefalse
Refreshfalsenullfalsefalsetruefalse
Evalonfalsenullfalsefalsetruefalse
Sortfalsenullfalsefalsetruefalse
Viewas...falsenullfalsefalsetruefalse
classesfalsenullfalsetruetruetrue
functionsfalsenullfalsetruetruetrue
objectsfalsenullfalsetruetruetrue
truetrue
falsenull
nullfalsetruenullfalse
Widgets.js:HandleMorph:onMouseMove(proto)falsenullfalse
false
false
falsenullfalsefalsenullnullnullnullfalsenull46