0) {\n\t\tsource += \"// ** \" + targetObj.name\t+ \"'s Scripts **\\n\"\n\t\tsource += scriptNames.collect(function(ea) {\n\t\t\treturn this.generateSourceForScript(baseObject, targetObj, ea)\n\t\t}, this).join('\\n\\n');\n\t}\n\n\tif (targetObj.attributeConnections) {\n\t\tsource += \"\\n\\n// ** \" + targetObj.name\t+ \"'s Connections **\\n\"\n\t\tsource += targetObj.attributeConnections.collect(function(ea) {\n\t\t\treturn this.generateSourceForConnection(baseObject, targetObj, ea)\n\t\t}, this).join('\\n');\n\t}\n\n\tif (targetObj.scriptSource && Object.isString(targetObj.scriptSource)) {\n\t\tsource += \"\\n\\n\";\n\t\tsource += this.generateSourceForProperty(\n\t\t\tbaseObject, targetObj, \"scriptSource\");\n\t}\n\n\treturn source\n}","funcProperties":{"__isSmartRef__":true,"id":317},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"316":{"this":{"__isSmartRef__":true,"id":263}},"317":{},"318":{"varMapping":{"__isSmartRef__":true,"id":319},"source":"function generateSourceForProperty(baseObject, targetObject, propertyName) {\n\tvar value = targetObject[propertyName];\n\treturn Strings.format('%s.'+ propertyName +'=%s;', \n\t\tthis.generateTargetCode(baseObject, targetObject),\t\n\t\tthis.generateSourceForValue(value))\n}","funcProperties":{"__isSmartRef__":true,"id":320},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"319":{"this":{"__isSmartRef__":true,"id":263}},"320":{},"321":{"varMapping":{"__isSmartRef__":true,"id":322},"source":"function generateSourceForScript(baseObject, targetObject, scriptName) {\n\tvar script =targetObject[scriptName].getOriginal();\n\treturn Strings.format('%s.addScript(%s);', \n\t\tthis.generateTargetCode(baseObject, targetObject) ,script)\n}","funcProperties":{"__isSmartRef__":true,"id":323},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"322":{"this":{"__isSmartRef__":true,"id":263}},"323":{},"324":{"varMapping":{"__isSmartRef__":true,"id":325},"source":"function generateSourceForValue(value) {\n\tif (Object.isString(value)) \n\t\treturn '\"' + value + '\"'\n\telse \n\t\treturn value\n}","funcProperties":{"__isSmartRef__":true,"id":326},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"325":{"this":{"__isSmartRef__":true,"id":263}},"326":{},"327":{"varMapping":{"__isSmartRef__":true,"id":328},"source":"function generateTargetCode(baseObject, targetObject) {\n\tvar name = targetObject.name;\n\tif (baseObject === targetObject) \n\t\treturn \"this\"\n\telse if (baseObject[name] === targetObject) \n\t\treturn \"this.\" + name\n\telse if (baseObject.testObject === targetObject) \n\t\treturn \"this.testObject\"\n\telse if (baseObject.get(name) === targetObject) \n\t\treturn 'this.get(\"' + name + '\")'\n\telse if (targetObject instanceof Morph) \n\t\treturn'$morph(\"' + name + '\")'\n\telse \n\t\treturn \"????\"\n}","funcProperties":{"__isSmartRef__":true,"id":329},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"328":{"this":{"__isSmartRef__":true,"id":263}},"329":{},"330":{"varMapping":{"__isSmartRef__":true,"id":331},"source":"function highlightSelectedObject(selection) {\n\tif (selection && selection.targetObj) showMorph(selection.targetObj)\n}","funcProperties":{"__isSmartRef__":true,"id":332},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"331":{"this":{"__isSmartRef__":true,"id":263}},"332":{},"333":{"varMapping":{"__isSmartRef__":true,"id":334},"source":"function listItemsForObj(obj, optPrefix) {\n\n\tvar listItems = [];\n\tvar prefix = optPrefix || \"\";\t\n\n\n\tif (obj.name) listItems.push({\n\t\tisListItem: true,\n\t\tstring: \"Object: \" + obj.name || \"unnamed\",\n\t\tvalue: {obj: obj, targetObj: obj}\t\n\t});\n\n\tif (obj.scriptSource && Object.isString(obj.scriptSource)) {\n\t\tlistItems.push({\n\t\t\tisListItem: true,\n\t\t\tstring: \" scriptSource\",\n\t\t\tvalue: {obj: obj, propertyName: 'scriptSource'}\t\n\t\t});\n\t}\n\n\tlistItems = listItems.concat(this.sortedScriptNamesOfObj(obj)\n\t\t.collect(function(name) { \n\t\t\treturn {isListItem: true, string: \" \" + name, value: {obj: obj, scriptName: name}}}))\n\n\t// BUG don't bind connections here...\n\tif (obj.attributeConnections)\n\t\t\tlistItems = listItems.concat(obj.attributeConnections.collect(function(ea) {\n\t\t\t\treturn {\n\t\t\t\t\tisListItem: true, \n\t\t\t\t\tstring: \" [\" + ea.getSourceAttrName() + \" -> \" + \n\t\t\t\t\t\tea.getTargetObj() + \".\" + ea.getTargetMethodName() + \"]\", \n\t\t\t\t\tvalue: {obj: obj, connection: ea }}\n\t\t\t}));\n\n\treturn listItems\n}","funcProperties":{"__isSmartRef__":true,"id":335},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"334":{"this":{"__isSmartRef__":true,"id":263}},"335":{},"336":{"varMapping":{"__isSmartRef__":true,"id":337},"source":"function removeTargetScript() {\n\tvar target = this.scriptList.selection.obj;\n\tif (!target) return;\n\n\n\tvar scriptName = this.scriptList.selection.scriptName; \n\tif (scriptName) {\n\t\tdelete target[scriptName];\n\t}\n\n\tvar connection = this.scriptList.selection.connection; \n\tif (connection)\n\t\tconnection.disconnect()\n\n\tthis.updateScriptList();\n}","funcProperties":{"__isSmartRef__":true,"id":338},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"337":{"this":{"__isSmartRef__":true,"id":263}},"338":{},"339":{"varMapping":{"__isSmartRef__":true,"id":340},"source":"function reset() {\n\t// this.reset()\n\tthis.bindMorphNames(\"targetName searchText scriptList scriptSource targetFound removeButton addButton closeButton\".split(\" \"))\n\tthis.target = null;\n\tthis.targetName.setTextString(\"nobody\");\n\tthis.scriptList.updateList([]);\n\tthis.scriptSource.setTextString(\"\");\n\tthis.searchText.setTextString(\"search for something\");\n}","funcProperties":{"__isSmartRef__":true,"id":341},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"340":{"this":{"__isSmartRef__":true,"id":263}},"341":{},"342":{"varMapping":{"__isSmartRef__":true,"id":343},"source":"function setSourceInPane(source, pane) {\n\tpane.setTextString(source);\n\tpane.owner.owner.scrollToTop();\n\n\tpane.highlightJavaScriptSyntax()\n}","funcProperties":{"__isSmartRef__":true,"id":344},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"343":{"this":{"__isSmartRef__":true,"id":263}},"344":{},"345":{"varMapping":{"__isSmartRef__":true,"id":346},"source":"function setTarget(obj) {\n\t// if (obj) alertOK(\"set target \" + obj.name)\n\tthis.target = obj\n\t// this.updateScriptList()\n\tif (!this.target) \n\t\tsource = 'no source';\n\telse \n\t\tsource = this.generateSourceForObject(this.target, this.target);\n\tthis.get('scriptSource').setTextString(source)\n\tthis.get('scriptSource').doitContext = this.target\n}","funcProperties":{"__isSmartRef__":true,"id":347},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"346":{"this":{"__isSmartRef__":true,"id":263}},"347":{},"348":{"varMapping":{"__isSmartRef__":true,"id":349},"source":"function setupConnections() {\n\t// this.setupConnections();\n\tconnect(this.targetName, 'textString', \n\t\tthis, 'target', \n\t\t{converter: function(n) { return $morph(n) }})\n\n\tconnect(this, 'target', \n\t\tthis.targetFound, 'setFill', \n\t\t{converter: function(obj) { return obj ? Color.green : Color.red}})\n\n\tconnect(this, 'target', this, 'setTarget')\n\n\tconnect(this.searchText, 'savedTextString', this, 'doSearch')\n}","funcProperties":{"__isSmartRef__":true,"id":350},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"349":{"this":{"__isSmartRef__":true,"id":263}},"350":{},"351":{"varMapping":{"__isSmartRef__":true,"id":352},"source":"function showTopLevelItems() {\n\tvar topLevelMorphs = this.world().submorphs.reject(function(morph){\n\t\treturn !morph.name;\n\t})\n\tvar morphNames = topLevelMorphs.pluck('name'),\n\t\titems = morphNames.collect(function(name) {\n\t\t\treturn [name, function() { $morph('targetName').setTextString(name) }]\n\t\t});\n\tMenuMorph.openAtHand(items, 'Select morph to edit')\n}","funcProperties":{"__isSmartRef__":true,"id":353},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"352":{"this":{"__isSmartRef__":true,"id":263}},"353":{},"354":{"varMapping":{"__isSmartRef__":true,"id":355},"source":"function sortedScriptNamesOfObj(obj) {\n\treturn Functions.own(obj)\n\t\t.select(function(name) { return obj[name].hasLivelyClosure })\n\t\t.sortBy(function(name) { return name.toLowerCase() });\n}","funcProperties":{"__isSmartRef__":true,"id":356},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"355":{"this":{"__isSmartRef__":true,"id":263}},"356":{},"357":{"varMapping":{"__isSmartRef__":true,"id":358},"source":"function updateScriptList() {\n\tthis.scriptList.updateList(this.allScriptListItems());\n\t// this.scriptList.selectLineAt(this.scriptList.selectedLineNo);\n\t// this.scriptSource.owner.owner.scrollToTop(); // demeter :-D\n}","funcProperties":{"__isSmartRef__":true,"id":359},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"358":{"this":{"__isSmartRef__":true,"id":263}},"359":{},"360":{"varMapping":{"__isSmartRef__":true,"id":361},"source":"function updateSourcePane(selection) { \n\tvar textMorph = this.scriptSource;\n\n\tif (!selection || !selection.obj) {\n\t\ttextMorph.setTextString(\"\");\n\t\treturn;\n\t}\n\n\tif (selection.targetObj) {\n\t\tthis.setSourceInPane(this.generateSourceForObject(\n\t\t\ttextMorph.getDoitContext(), selection.targetObj), textMorph);\n\t\treturn;\n\t}\n\n\tif (selection.connection) {\n\t\tthis.setSourceInPane(this.generateSourceForConnection(\n\t\t\ttextMorph.getDoitContext(),selection.obj,selection.connection), textMorph);\n\t\treturn;\n\t}\n\n\tif (selection.propertyName) {\n\t\tthis.setSourceInPane(this.generateSourceForProperty(\n\t\t\ttextMorph.getDoitContext(), selection.obj, selection.propertyName), textMorph);\n\t\treturn;\n\t}\n\n\tthis.setSourceInPane(\n\t\tthis.generateSourceForScript(textMorph.getDoitContext(),selection.obj, selection.scriptName), \n\t\ttextMorph)\n}","funcProperties":{"__isSmartRef__":true,"id":362},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"361":{"this":{"__isSmartRef__":true,"id":263}},"362":{},"363":{"_BorderWidth":0,"_Fill":null,"_StrokeOpacity":0,"_BorderRadius":0,"_Extent":{"__isSmartRef__":true,"id":364},"__SourceModuleName__":"Global.lively.morphic.Shapes","__LivelyClassName__":"lively.morphic.Shapes.Rectangle"},"364":{"x":762,"y":387,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"365":{"adjustForNewBounds":true},"366":{"x":1003,"y":2810,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"367":{"x":762,"y":387,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"368":{"x":0,"y":22,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"369":{"x":1195,"y":2819,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"370":{"partsSpaceName":"PartsBin/NewWorld","__SourceModuleName__":"Global.lively.PartsBin","__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo"},"371":{"setTitle":{"__isSmartRef__":true,"id":372},"setTarget":{"__isSmartRef__":true,"id":379}},"372":{"varMapping":{"__isSmartRef__":true,"id":373},"source":"function setTitle(s) {\n\tthis.titleBar.label.setTextString(s)\n}","funcProperties":{"__isSmartRef__":true,"id":378},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"373":{"this":{"__isSmartRef__":true,"id":152},"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":374}},"374":{"$super":{"__isSmartRef__":true,"id":375}},"375":{"varMapping":{"__isSmartRef__":true,"id":376},"source":"function () {\n\t\t\t\ttry {\n\t\t\t\t\treturn obj.constructor.prototype[name].apply(obj, arguments)\n\t\t\t\t} catch(e) {\n\t\t\t\t\talert('Error in $super call: ' + e + '\\n' + e.stack);\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}","funcProperties":{"__isSmartRef__":true,"id":377},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"376":{"obj":{"__isSmartRef__":true,"id":152},"name":"setTitle"},"377":{},"378":{},"379":{"varMapping":{"__isSmartRef__":true,"id":380},"source":"function setTarget(obj) {\n\tthis.submorphs.last().setTarget(obj)\n}","funcProperties":{"__isSmartRef__":true,"id":381},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"380":{"this":{"__isSmartRef__":true,"id":152}},"381":{},"382":{"submorphs":[],"scripts":[],"id":66,"shape":{"__isSmartRef__":true,"id":383},"grabbingEnabled":false,"droppingEnabled":false,"halosEnabled":true,"fixedWidth":true,"fixedHeight":false,"allowsInput":true,"_OverflowMode":"visible","_FontFamily":"Arial, sans-serif","registeredForMouseEvents":true,"_Position":{"__isSmartRef__":true,"id":387},"_MaxTextWidth":168,"_MaxTextHeight":null,"textColor":{"__isSmartRef__":true,"id":386},"showsHalos":false,"halos":[],"_FontSize":14,"__SourceModuleName__":"Global.lively.morphic.Core","_Rotation":0,"name":"dateCreatedText","partsBinMetaInfo":{"__isSmartRef__":true,"id":388},"textChunks":[{"__isSmartRef__":true,"id":389},{"__isSmartRef__":true,"id":391}],"charsReplaced":"s","lastFindLoc":6,"priorSelectionRange":[0,0],"prevScroll":[-1,-1],"owner":{"__isSmartRef__":true,"id":0},"__LivelyClassName__":"lively.morphic.Text"},"383":{"fill":null,"__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":{"__isSmartRef__":true,"id":384},"_Extent":{"__isSmartRef__":true,"id":385},"_BorderWidth":1,"_BorderColor":{"__isSmartRef__":true,"id":386},"__LivelyClassName__":"lively.morphic.Shapes.Rectangle"},"384":{"x":0,"y":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"385":{"x":168,"y":23,"__LivelyClassName__":"Point","__SourceModuleName__":"Global"},"386":{"r":0,"g":0,"b":0,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"387":{"x":953.485887751459,"y":357.55720790679715,"__LivelyClassName__":"Point","__SourceModuleName__":"Global"},"388":{"partsSpaceName":"PartsBin/NewWorld","__SourceModuleName__":"Global.lively.PartsBin","migrationLevel":1,"__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo"},"389":{"style":{"__isSmartRef__":true,"id":390},"morph":{"__isSmartRef__":true,"id":382},"__SourceModuleName__":"Global.lively.morphic.Core","storedString":"Rich Text :-)","__LivelyClassName__":"lively.morphic.TextChunk"},"390":{"fontWeight":"bold","__SourceModuleName__":"Global.lively.morphic.Core","__LivelyClassName__":"lively.morphic.TextEmphasis"},"391":{"style":{"__isSmartRef__":true,"id":392},"morph":{"__isSmartRef__":true,"id":382},"__SourceModuleName__":"Global.lively.morphic.Core","storedString":"\n","__LivelyClassName__":"lively.morphic.TextChunk"},"392":{"__SourceModuleName__":"Global.lively.morphic.Core","__LivelyClassName__":"lively.morphic.TextEmphasis"},"393":{"__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":{"__isSmartRef__":true,"id":394},"_Extent":{"__isSmartRef__":true,"id":395},"_Fill":{"__isSmartRef__":true,"id":396},"__LivelyClassName__":"lively.morphic.Shapes.Rectangle"},"394":{"x":0,"y":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"395":{"x":2800,"y":7000,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"396":{"r":1,"g":1,"b":1,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"397":{"x":0,"y":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"398":{"name":"Local code","__LivelyClassName__":"ChangeSet","__SourceModuleName__":"Global.lively.ChangeSet"},"isSimplifiedRegistry":true}}]]>