{"id":0,"registry":{"0":{"submorphs":[{"__isSmartRef__":true,"id":1},{"__isSmartRef__":true,"id":41},{"__isSmartRef__":true,"id":344},{"__isSmartRef__":true,"id":348},{"__isSmartRef__":true,"id":352}],"scripts":[],"shape":{"__isSmartRef__":true,"id":356},"_ClipMode":"visible","derivationIds":["D72BBF73-6468-49F5-AD51-3B1954667C23","FB8BA7AA-1BB6-4305-AE1F-4CCA179A0065","C0E728A9-C842-454D-A6BE-F98E3085971B"],"id":"05BAAA30-3348-4451-8B13-28CD12BD4F8C","droppingEnabled":false,"halosEnabled":true,"draggingEnabled":true,"layout":{"__isSmartRef__":true,"id":357},"closeButton":{"__isSmartRef__":true,"id":8},"collapseButton":{"__isSmartRef__":true,"id":18},"menuButton":{"__isSmartRef__":true,"id":28},"reframeHandle":{"__isSmartRef__":true,"id":344},"rightReframeHandle":{"__isSmartRef__":true,"id":352},"bottomReframeHandle":{"__isSmartRef__":true,"id":348},"titleBar":{"__isSmartRef__":true,"id":1},"collapsedTransform":{"__isSmartRef__":true,"id":358},"expandedTransform":{"__isSmartRef__":true,"id":359},"ignoreEventsOnExpand":false,"_PreviousBorderWidth":0,"targetMorph":{"__isSmartRef__":true,"id":41},"eventHandler":{"__isSmartRef__":true,"id":360},"partsBinMetaInfo":{"__isSmartRef__":true,"id":361},"name":"VMPanel3","_StyleClassNames":["Morph","Window"],"helperMorphs":[{"__isSmartRef__":true,"id":344},{"__isSmartRef__":true,"id":348},{"__isSmartRef__":true,"id":352}],"state":"expanded","showsHalos":false,"_Rotation":0,"_Scale":1,"__serializedExpressions__":["_Position","contentOffset","collapsedExtent","expandedExtent","expandedPosition","collapsedPosition","distanceToDragEvent"],"__LivelyClassName__":"lively.morphic.Window","__SourceModuleName__":"Global.lively.morphic.Widgets","withoutLayers":["Global.lively.morphic.GrabbingLayer"],"_Position":"lively.pt(0.0,0.0)","contentOffset":"lively.pt(3.0,22.0)","collapsedExtent":"lively.pt(155.0,22.0)","expandedExtent":"lively.pt(620.0,602.0)","expandedPosition":"lively.pt(557.0,62.0)","collapsedPosition":"lively.pt(565.0,581.0)","distanceToDragEvent":"lively.pt(419.0,-9.0)"},"1":{"submorphs":[{"__isSmartRef__":true,"id":2},{"__isSmartRef__":true,"id":8},{"__isSmartRef__":true,"id":18},{"__isSmartRef__":true,"id":28}],"scripts":[],"shape":{"__isSmartRef__":true,"id":38},"_ClipMode":"visible","derivationIds":["766D2E4E-FA6A-4C2E-AD6B-0B6C6B7F9874","A4DA3473-64F7-4081-8D65-59548A0B0447","6A7A560A-8434-4CEC-A66B-049C5C856211"],"id":"BC6AD89A-D09B-4F94-9DDE-0F0A0CE0832D","droppingEnabled":false,"halosEnabled":true,"layout":{"__isSmartRef__":true,"id":39},"windowMorph":{"__isSmartRef__":true,"id":0},"buttons":[{"__isSmartRef__":true,"id":8},{"__isSmartRef__":true,"id":18},{"__isSmartRef__":true,"id":28}],"label":{"__isSmartRef__":true,"id":2},"_PreviousBorderWidth":0,"owner":{"__isSmartRef__":true,"id":0},"eventHandler":{"__isSmartRef__":true,"id":40},"showsHalos":false,"__serializedExpressions__":["_Position"],"__LivelyClassName__":"lively.morphic.TitleBar","__SourceModuleName__":"Global.lively.morphic.Widgets","_Position":"lively.pt(0.0,0.0)"},"2":{"submorphs":[],"scripts":[],"shape":{"__isSmartRef__":true,"id":3},"_WhiteSpaceHandling":"pre","textChunks":[{"__isSmartRef__":true,"id":4}],"_ClipMode":"hidden","derivationIds":["F5A29791-01B0-4314-8774-9D5EB833A5BB","6BA19218-083A-4B7C-81FE-7D3E18A9574E","77DDF95B-64BF-4D0B-B648-CB0AF375FD5A"],"id":"C991903A-C7BB-416B-AE5F-2A24F5BFC9A8","_InputAllowed":false,"_HandStyle":"default","allowInput":false,"grabbingEnabled":false,"droppingEnabled":false,"halosEnabled":true,"draggingEnabled":true,"fixedWidth":true,"fixedHeight":true,"_FontFamily":"Helvetica","_FontSize":10,"evalEnabled":false,"isLabel":true,"eventsAreIgnored":true,"layout":{"__isSmartRef__":true,"id":6},"owner":{"__isSmartRef__":true,"id":1},"_StyleClassNames":["Morph","Text","window-title"],"_TextStylingMode":true,"eventHandler":{"__isSmartRef__":true,"id":7},"showsHalos":false,"__serializedExpressions__":["_TextColor","_Position"],"__LivelyClassName__":"lively.morphic.Text","__SourceModuleName__":"Global.lively.morphic.TextCore","_TextColor":"Color.rgb(64,64,64)","_Position":"lively.pt(3.0,3.0)"},"3":{"_BorderWidth":0,"_Fill":null,"__serializedExpressions__":["_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(536.0,16.0)","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(0,0,0)"},"4":{"style":{"__isSmartRef__":true,"id":5},"chunkOwner":{"__isSmartRef__":true,"id":2},"_id":"_7405","storedString":"VMPanel","__LivelyClassName__":"lively.morphic.TextChunk","__SourceModuleName__":"Global.lively.morphic.TextCore"},"5":{"__LivelyClassName__":"lively.morphic.TextEmphasis","__SourceModuleName__":"Global.lively.morphic.TextCore"},"6":{"resizeWidth":true},"7":{"morph":{"__isSmartRef__":true,"id":2},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"8":{"submorphs":[{"__isSmartRef__":true,"id":9}],"scripts":[],"shape":{"__isSmartRef__":true,"id":14},"_ClipMode":"visible","derivationIds":["D120173B-52C9-4524-BA57-7683E1761630","AEF6F1EE-B169-435C-A721-8259ABFB2030","378A7443-7453-4BFE-B858-690064B3B9AF"],"id":"F3D50C9A-751E-47FE-80CC-17C9F45C0908","grabbingEnabled":false,"droppingEnabled":false,"halosEnabled":true,"accessibleInInactiveWindow":true,"value":false,"toggle":false,"isActive":true,"label":{"__isSmartRef__":true,"id":9},"_PreviousBorderWidth":0,"owner":{"__isSmartRef__":true,"id":1},"_StyleClassNames":["Morph","Button","WindowControl","close"],"attributeConnections":[{"__isSmartRef__":true,"id":15}],"doNotSerialize":["$$fire"],"doNotCopyProperties":["$$fire"],"eventHandler":{"__isSmartRef__":true,"id":17},"isPressed":false,"__serializedExpressions__":["_Position"],"__LivelyClassName__":"lively.morphic.WindowControl","__SourceModuleName__":"Global.lively.morphic.Widgets","_Position":"lively.pt(608.0,3.0)"},"9":{"submorphs":[],"scripts":[],"shape":{"__isSmartRef__":true,"id":10},"_WhiteSpaceHandling":"pre","textChunks":[{"__isSmartRef__":true,"id":11}],"_ClipMode":"hidden","derivationIds":["94CAE3DE-3E25-4E36-AE2D-D0EEA5F75A72","22D8362C-09D3-49EF-9CA1-1D39CA37DA95","E87BFF57-D18C-49A1-A6DE-8B9C7AEFB160"],"id":"C63AA880-4047-46D9-991D-9233BD6954F3","_InputAllowed":false,"_HandStyle":"default","allowInput":false,"grabbingEnabled":false,"droppingEnabled":false,"halosEnabled":true,"draggingEnabled":true,"fixedWidth":true,"fixedHeight":true,"_FontFamily":"Helvetica","_FontSize":10,"evalEnabled":false,"owner":{"__isSmartRef__":true,"id":8},"isLabel":true,"eventsAreIgnored":true,"_TextStylingMode":true,"eventsAreDisabled":true,"_PointerEvents":"none","eventHandler":{"__isSmartRef__":true,"id":13},"__serializedExpressions__":["_TextColor","_Position"],"__LivelyClassName__":"lively.morphic.Text","__SourceModuleName__":"Global.lively.morphic.TextCore","_TextColor":"Color.rgb(64,64,64)","_Position":"lively.pt(0.0,0.0)"},"10":{"_BorderWidth":0,"_Fill":null,"__serializedExpressions__":["_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(17.0,17.0)","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(0,0,0)"},"11":{"style":{"__isSmartRef__":true,"id":12},"chunkOwner":{"__isSmartRef__":true,"id":9},"_id":"_7383","storedString":"X","__LivelyClassName__":"lively.morphic.TextChunk","__SourceModuleName__":"Global.lively.morphic.TextCore"},"12":{"__LivelyClassName__":"lively.morphic.TextEmphasis","__SourceModuleName__":"Global.lively.morphic.TextCore"},"13":{"morph":{"__isSmartRef__":true,"id":9},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"14":{"_BorderWidth":1,"_Fill":null,"_StrokeOpacity":0,"_BorderRadius":5,"_AppearanceStylingMode":true,"_BorderStylingMode":true,"__serializedExpressions__":["_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(17.0,17.0)","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(189,190,192)"},"15":{"sourceObj":{"__isSmartRef__":true,"id":8},"sourceAttrName":"fire","targetObj":{"__isSmartRef__":true,"id":0},"targetMethodName":"initiateShutdown","varMapping":{"__isSmartRef__":true,"id":16},"__LivelyClassName__":"AttributeConnection","__SourceModuleName__":"Global.lively.bindings.Core"},"16":{"source":{"__isSmartRef__":true,"id":8},"target":{"__isSmartRef__":true,"id":0}},"17":{"morph":{"__isSmartRef__":true,"id":8},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"18":{"submorphs":[{"__isSmartRef__":true,"id":19}],"scripts":[],"shape":{"__isSmartRef__":true,"id":24},"_ClipMode":"visible","derivationIds":["668FDAD2-1E9D-4B68-ABAB-53347E5BA94C","77F9DB9B-5932-458A-8490-12882D2C589E","58D1F7E0-C3D3-43CA-A370-90A8DE5EC395"],"id":"4176B92F-A1CC-4536-9A39-DCEB6E454754","grabbingEnabled":false,"droppingEnabled":false,"halosEnabled":true,"accessibleInInactiveWindow":true,"value":false,"toggle":false,"isActive":true,"label":{"__isSmartRef__":true,"id":19},"_PreviousBorderWidth":0,"owner":{"__isSmartRef__":true,"id":1},"attributeConnections":[{"__isSmartRef__":true,"id":25}],"doNotSerialize":["$$fire"],"doNotCopyProperties":["$$fire"],"eventHandler":{"__isSmartRef__":true,"id":27},"isPressed":false,"_StyleClassNames":["Morph","Button","WindowControl"],"__serializedExpressions__":["_Position"],"__LivelyClassName__":"lively.morphic.WindowControl","__SourceModuleName__":"Global.lively.morphic.Widgets","_Position":"lively.pt(588.0,3.0)"},"19":{"submorphs":[],"scripts":[],"shape":{"__isSmartRef__":true,"id":20},"_WhiteSpaceHandling":"pre","textChunks":[{"__isSmartRef__":true,"id":21}],"_ClipMode":"hidden","derivationIds":["B9FB05FA-7630-426A-8979-7D0D9B292971","6AD056F5-4997-4D37-A9D4-8D367E77CCA5","126CD853-834F-4B74-8A67-7B2EDAD78E81"],"id":"D62C5E42-4767-47C4-AC4B-692FDEC6D244","_InputAllowed":false,"_HandStyle":"default","allowInput":false,"grabbingEnabled":false,"droppingEnabled":false,"halosEnabled":true,"draggingEnabled":true,"fixedWidth":true,"fixedHeight":true,"_FontFamily":"Helvetica","_FontSize":10,"evalEnabled":false,"owner":{"__isSmartRef__":true,"id":18},"isLabel":true,"eventsAreIgnored":true,"_TextStylingMode":true,"eventsAreDisabled":true,"_PointerEvents":"none","eventHandler":{"__isSmartRef__":true,"id":23},"__serializedExpressions__":["_TextColor","_Position"],"__LivelyClassName__":"lively.morphic.Text","__SourceModuleName__":"Global.lively.morphic.TextCore","_TextColor":"Color.rgb(64,64,64)","_Position":"lively.pt(0.0,0.0)"},"20":{"_BorderWidth":0,"_Fill":null,"__serializedExpressions__":["_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(17.0,17.0)","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(0,0,0)"},"21":{"style":{"__isSmartRef__":true,"id":22},"chunkOwner":{"__isSmartRef__":true,"id":19},"_id":"_7388","storedString":"–","__LivelyClassName__":"lively.morphic.TextChunk","__SourceModuleName__":"Global.lively.morphic.TextCore"},"22":{"__LivelyClassName__":"lively.morphic.TextEmphasis","__SourceModuleName__":"Global.lively.morphic.TextCore"},"23":{"morph":{"__isSmartRef__":true,"id":19},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"24":{"_BorderWidth":1,"_Fill":null,"_StrokeOpacity":0,"_BorderRadius":5,"_AppearanceStylingMode":true,"_BorderStylingMode":true,"__serializedExpressions__":["_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(17.0,17.0)","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(189,190,192)"},"25":{"sourceObj":{"__isSmartRef__":true,"id":18},"sourceAttrName":"fire","targetObj":{"__isSmartRef__":true,"id":0},"targetMethodName":"toggleCollapse","varMapping":{"__isSmartRef__":true,"id":26},"__LivelyClassName__":"AttributeConnection","__SourceModuleName__":"Global.lively.bindings.Core"},"26":{"source":{"__isSmartRef__":true,"id":18},"target":{"__isSmartRef__":true,"id":0}},"27":{"morph":{"__isSmartRef__":true,"id":18},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"28":{"submorphs":[{"__isSmartRef__":true,"id":29}],"scripts":[],"shape":{"__isSmartRef__":true,"id":34},"_ClipMode":"visible","derivationIds":["D6E345A0-071B-4676-B167-5D4E769CFBF9","E8E773AE-3027-4D23-B18D-C5AB311C7336","C58B01D3-F40F-4DC1-9965-CA73AC3BC55D"],"id":"CE741F2E-9864-4FD6-B5D8-24F7B5DAB784","grabbingEnabled":false,"droppingEnabled":false,"halosEnabled":true,"accessibleInInactiveWindow":true,"value":false,"toggle":false,"isActive":true,"label":{"__isSmartRef__":true,"id":29},"_PreviousBorderWidth":0,"owner":{"__isSmartRef__":true,"id":1},"attributeConnections":[{"__isSmartRef__":true,"id":35}],"doNotSerialize":["$$fire"],"doNotCopyProperties":["$$fire"],"eventHandler":{"__isSmartRef__":true,"id":37},"isPressed":false,"_StyleClassNames":["Morph","Button","WindowControl"],"__serializedExpressions__":["_Position"],"__LivelyClassName__":"lively.morphic.WindowControl","__SourceModuleName__":"Global.lively.morphic.Widgets","_Position":"lively.pt(545.0,3.0)"},"29":{"submorphs":[],"scripts":[],"shape":{"__isSmartRef__":true,"id":30},"_WhiteSpaceHandling":"pre","textChunks":[{"__isSmartRef__":true,"id":31}],"_ClipMode":"hidden","derivationIds":["5D80221E-6462-4D65-8A32-12A81792C32A","5749A986-2E2F-4DFD-9A23-C2EC455CB931","E8D480DC-B41A-4C0C-AABC-D4448D21F026"],"id":"304F62C6-19B1-452E-BE24-9FF961D7FB7C","_InputAllowed":false,"_HandStyle":"default","allowInput":false,"grabbingEnabled":false,"droppingEnabled":false,"halosEnabled":true,"draggingEnabled":true,"fixedWidth":true,"fixedHeight":true,"_FontFamily":"Helvetica","_FontSize":10,"evalEnabled":false,"owner":{"__isSmartRef__":true,"id":28},"isLabel":true,"eventsAreIgnored":true,"_TextStylingMode":true,"eventsAreDisabled":true,"_PointerEvents":"none","eventHandler":{"__isSmartRef__":true,"id":33},"__serializedExpressions__":["_TextColor","_Position"],"__LivelyClassName__":"lively.morphic.Text","__SourceModuleName__":"Global.lively.morphic.TextCore","_TextColor":"Color.rgb(64,64,64)","_Position":"lively.pt(0.0,0.0)"},"30":{"_BorderWidth":0,"_Fill":null,"__serializedExpressions__":["_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(40.0,17.0)","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(0,0,0)"},"31":{"style":{"__isSmartRef__":true,"id":32},"chunkOwner":{"__isSmartRef__":true,"id":29},"_id":"_7393","storedString":"Menu","__LivelyClassName__":"lively.morphic.TextChunk","__SourceModuleName__":"Global.lively.morphic.TextCore"},"32":{"__LivelyClassName__":"lively.morphic.TextEmphasis","__SourceModuleName__":"Global.lively.morphic.TextCore"},"33":{"morph":{"__isSmartRef__":true,"id":29},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"34":{"_BorderWidth":1,"_Fill":null,"_StrokeOpacity":0,"_BorderRadius":5,"_AppearanceStylingMode":true,"_BorderStylingMode":true,"__serializedExpressions__":["_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(40.0,17.0)","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(189,190,192)"},"35":{"sourceObj":{"__isSmartRef__":true,"id":28},"sourceAttrName":"fire","targetObj":{"__isSmartRef__":true,"id":0},"targetMethodName":"showTargetMorphMenu","varMapping":{"__isSmartRef__":true,"id":36},"__LivelyClassName__":"AttributeConnection","__SourceModuleName__":"Global.lively.bindings.Core"},"36":{"source":{"__isSmartRef__":true,"id":28},"target":{"__isSmartRef__":true,"id":0}},"37":{"morph":{"__isSmartRef__":true,"id":28},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"38":{"_BorderWidth":0,"_BorderColor":null,"_Fill":null,"_AppearanceStylingMode":true,"_BorderStylingMode":true,"_BorderRadius":"8px 8px 0px 0px","__serializedExpressions__":["_Position","_Extent","_Padding"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(628.0,22.0)","_Padding":"lively.rect(0,0,0,0)"},"39":{"resizeWidth":true,"adjustForNewBounds":true},"40":{"morph":{"__isSmartRef__":true,"id":1},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"41":{"submorphs":[{"__isSmartRef__":true,"id":42},{"__isSmartRef__":true,"id":46},{"__isSmartRef__":true,"id":69},{"__isSmartRef__":true,"id":92},{"__isSmartRef__":true,"id":115},{"__isSmartRef__":true,"id":119},{"__isSmartRef__":true,"id":142},{"__isSmartRef__":true,"id":146},{"__isSmartRef__":true,"id":169}],"scripts":[],"id":"43AA33F5-E0A2-4148-B01E-2532E4F5B9B7","shape":{"__isSmartRef__":true,"id":207},"__layered_droppingEnabled__":true,"halosEnabled":true,"registeredForMouseEvents":true,"showsHalos":false,"name":"VMPanel2","partsBinMetaInfo":{"__isSmartRef__":true,"id":208},"eventHandler":{"__isSmartRef__":true,"id":236},"derivationIds":[127,"F0291F62-F100-480C-AEBF-0230398F7983","AE8B5ED7-E305-45BC-BE4A-1C28A49EE12B","39BA345C-17FA-45A0-BAC2-F0CF5654ACF8","FE91EA31-D8AE-461B-8A49-95DA5FBAE5B4","F38439A3-2F4E-4AC2-BF73-2633C00B1393","6748F5B5-2284-4748-A6EE-F1A261CBAD0B","BBAFB862-93AE-4F89-BCFF-9F1C67B7FE4C","7EC17E78-593A-4CC8-B7E3-859BCBBFE785","BD8BECDB-A9A1-4009-B433-C925F0AFCCFC","F2677A9D-5855-4DF2-B248-94545B34B762","D52188B3-7DC0-410E-96B1-50892AC00A37","1C17567C-751A-447E-A93C-0CE8CAEEF262","C31986AF-AB07-427F-BD76-E0F3859AC975","48DB44AA-AB10-401A-9EB0-74ABDEB5358D","004FF9EF-1541-4966-892E-E9849D912300","59895065-DF48-44C3-BEE8-282EDEE3D186"],"partTests":{"__isSmartRef__":true,"id":237},"_ClipMode":"visible","moved":true,"droppingEnabled":true,"owner":{"__isSmartRef__":true,"id":0},"isBeingDragged":false,"ST72Class":{"__isSmartRef__":true,"id":242},"userDict":{"__isSmartRef__":true,"id":244},"ST72Descriptor":{"__isSmartRef__":true,"id":245},"transcript":{"__isSmartRef__":true,"id":169},"activeContext":{"__isSmartRef__":true,"id":257},"inputLines":["'This is the top-level user program.  Its class variables also serve as the global symbol table (also known in the interpreter as TopLev).'","","'Phase II.","As soon as USER has been defined (ie from here on), it provides the code to execute in each cycle of Smalltalk execution.'","","to isnew (CODE 5)","","to falseclass (isnew)","","to atom x y (CODE 29)","","'** skipped** \"false _ falseclass.'","","to print (%..)","\t':x.Print its address in octal.","\tPrinting goes to the same place as CODE 20. This is used primarily","\tfor bootstrapping. All system classes will print themselves.'","",""," ","","'MESSAGE HANDLING'","","to : (CODE 18)","\t'to : name","","\t%\" ?(:\"name nil ?(!name_caller message quotefetch)","\t\t\t\t(!caller message quotefetch))","","\tFetch the next thing in the message stream unevaluated","\tand bind it to the name if one is there.","","\t%# ?(:\"name nil ?(!name_caller message referencefetch)","\t\t\t\t(!caller message referencefetch))","","\tFetch the reference to next thing in the message stream","\tand bind it to the name if one is there.","","\t\t(:\"name nil ?(!name_ caller message evalfetch)","\t\t\t!caller message evalfetch)","","\tFetch the next thing in the message stream evaluated","\tand bind it to the name if one is there.'","","to % (CODE 17)","\t':\"token. token=caller.message.code[caller.message.pc]?","\t\t(caller.message.pc_caller.message.pc+1. !true) !false.","\tThat is, if a match for the token is found in the message, then"," \tgobble it up and return true, else return false.'","","to \u0003 (CODE 36)","\t'Fetch the next token quoted -- equivalent to (:\").'","","to ! (CODE 13)","\t':x. then do a return, and apply x to any further message. Note","\tthat in (... !x+3. \"y_y-2), the assignment to y will never","\thappen, since ! causes a return.'","","to \" (CODE 9)","\t'!:\". That is, get the next thing in the message stream unevalled","\tand active return it (which\tcauses it to be applied to the message).'","","to # (:# )","\t'Returns a REFERENCE to its arguments binding.'","","","'CONTROL CLASSES'"," ","to repeat token (:#token. CODE 1)","\t'repeat (token eval) Not a true apply to eval, and therefore token","\tMUST be a vector.'","","to done x (%with?(:x. CODE 25) CODE 25)","\t'done causes a pop out of the nearest enclosing repeat, for, or do.  ","\t\u000fdone with val\u000f will cause the repeat to have value val'","","to again (CODE 6)","\t'repeat (\"active_active caller. eq active. class #repeat?(done)).","\tThat is, redo the most recent repeat, for, or do loop.'","","to if exp (:exp?(%then?(:exp. %else?(:\". exp)exp)error \"(no then))","\t\t%then?(:\".   %else?(:exp) false)error \"(no then))","\t'The ALGOL \u000fif ... then ... else ...\u000f'","","to for token step stop var start exp (","\t:\"var. (%_?(:start.)\"start_1).","\t(%to?(:stop.)\"stop_start.)","\t(%by?(:step.)\"step_1.)","\t%do. :#exp. CODE 24)","\t'An Algol-like \u000ffor\u000f.","\tNote the default values if \u000f_\u000f,\u000fto\u000f,\u000fby\u000f,etc., are omitted.","\tCODE 24 means  --repeat(exp eval).\tThis implies \u000fdone\u000f and \u000fagain\u000f","\twill work, which is correct.'","","to do token step stop var start exp (","\t\"step_\"start_1. :stop. :#exp. CODE 24)","","","","'INITIALIZING SYSTEM CLASSES","","","\t\tHere are the main kludges which remain from the time when we","\treally didn|t understand classes very well, but wanted a working","\tSMALLTALK. PUT and GET are two of the principle actions of class","\tclass. The new verson of SMALLTALK will have class as a class","\twith these actions intensional.'","","to PUT x y z (:#x. :y. :z. CODE 12)","\t'The first argument MUST be an atom which is bound to a class","\ttable.  The third argument is installed in the value side of that table","\tcorresponding to the name (atom) which was the second argument.'  ","","to GET x y (:#x. :y. CODE 28)","\t'If \u000fx\u000f is a class table then the binding of the atom in \u000fy\u000f will be","\tfetched.'","","to leech field bits : ptr (","\tisnew?(:ptr)","\tCODE 27)","\t'Lets you subscript any instance","\ta[0] gives you the class, a[1] gives the first field, etc.","\ta[2] gives you the pointer; a[2]&   returns the BITS in an integer","\ta[2]_foo will dereference count previous contents, but a[2]&_ foo","\twill not.'","","to atom x y (CODE 29","\t'%_?(:x.  !x -- Lookup SELF and replace its value by x.)","\t%eval?(! -- Lookup the binding of SELF)","\t%=?(!SELF=:)","\t%chars?(! -- printname of SELF (a string))'","","\t%is?(ISIT eval)","\t%print?(disp_SELF chars) )","\t'Done this way (PUT used rather than using \u000fto\u000f) because we","\twanted to know where the system classes are. Hence the initial","\t\u000fto atom x y ()\u000f , for example, in \u000fBootstrapping Magic\u000f followed","\tby the behavior here.'","","to falseclass (CODE 11","\t'%?? (:\".)","\t%or? (!:)","\t%and? (:.)","\t%<? (:.)","\t%=? (:.)","\t%>? (:.)'","","\tisnew.","\t%is?(%false?(!true) %~? (!\"false) :\".)","\t%print?(\"false print) )","","to vector x y : : substr (CODE 3 ?(!substr SELF x GLOB MESS)","\t'isnew?(Allocate vector of length :.","\t\tFill vector with nils.)","\t%[?(:x. %].","\t\t(%_?(:y. !y -- store y into xth element. )","\t\t!  xth element) )","\t%length?(! length of string or vector)","\t%eval?(\"pc_0. repeat","\t\t(null SELF[\"pc_pc+1]?(done)","\t\t\"val_SELF[pc] eval)","\t\t!val) sort of...'","\t%is?(ISIT eval)","\t%print?(disp_40. for x to SELF length","\t\t(disp_32. SELF[x] print). disp_41)","\t%map?(:y. for x to SELF length","\t\t(evapply SELF[x] to y)) )","","to string x y : : substr (CODE 3 ?(!substr SELF x GLOB MESS)","","\t'isnew?(Allocate string of length :.","\t\tFill string with 255s.)","\t%[?(:x. %].","\t\t(%_?(:y. !y -- store y into xth element. )","\t\t!  xth element) )","\t%length?(! length of string or vector)'","","\t%is?(ISIT eval)","\t%print?(0 = \"x _ SELF[1 to 9999] find first 39?","\t\t (disp _ 39. disp _ SELF. disp _ 39)","\t\t SELF[1 to x - 1] print. SELF[x+1 to SELF length] print)","\t%=?(:y is string?(SELF length=y length?(","\t\tfor x to SELF length (SELF[x]=y[x]?() !false)) !false)","\t\t!false)","\t%+?(:y is string?(\"x_SELF[1 to SELF length+y length].","\t\t!x[SELF length+1 to x length]_y[1 to y length])","\t\terror \"(string not found)) )","","to number x y : : nprint (CODE 4","\t'%+?(!val+:)","\t%-?(!val-:)","\t%*?(!val*:)","\t%/?(!val/:)","\t%<?(!val<:)","\t%=?(!val=:","\t%>?(!val>:)","\t%&  ?(%+?(!val OR :)","\t\t%-?(!val XOR :)","\t\t%*?(!val AND :)","\t\t%/?(!val LSHIFT :)))'","","\t%is?(ISIT eval)","\t%print?(SELF>0?(nprint SELF)","\t\tSELF=0?(disp_48)","\t\tdisp_21. nprint 0-SELF) )","\t'For floating point stuff see FLOAT'","","to disp x i (","\t%_?(:x is string?(for i to x length (disp_x[i])) CODE 23)","\t%clear?() %sub?(:x eval))","\t'Writes a character or string to the bootstrap printer.","\tLater it will redefined as a \u000fdisplay frame.\u000f'","","to cr (disp_13)","to sp (disp_32)","","to ev (repeat (cr read eval print))","","to USER (ev)","","'The top-level user process is now defined.","The bootstrap reader stops here, and USER starts to run.'","","to - x (:x*-1)","\t'An often used abbreviation, has to work for float as well.'","","to base8 i x s (:x. \"s_string 7. for i to 7","\t(s[8-i] _ 48 + x &* 7. \"x _ x &/ -3). !s)","\t'Returns a string containing the octal representation (unsigned) of its","\tinteger argument.'"," ","","\"ISIT _ \"(%~?(!TITLE) !TITLE=:\").","","to nil x (#x)","\t'nil is an \u000funbound pointer\u000f, which is used\tto fill vectors and","\ttables.'","","to eq (CODE 15)","\t'(! : is-identical-to :) - compare 2 SMALLTALK pointers.'","","to null x y (:x. ! eq #x #y)","\t'Null returns true if its message is \u000fnil\u000f, otherwise false.'","","'UTILITIES'"," ","to mem x y (:x. CODE 26)","\t'to mem x y (:x. %_?(!core/mem x _:)!core/mem x)","\tmem loads integers from and stores them into real core.","\tTee hee...","\tmem 280 _ 0  --set alto clock to zero","\tmem 280  ;read the clock","\tfor i to 16 (mem 280+i _ cursor[i])  --put new bits into cursor","\tmem 276 _ mem 277 _ 0.  --reset mouse x and y to 0.","\tmem 69 _ 0.  --disconnect cursor from mouse","\tmem 278 _ x. mem 0427 _ y.  --move the cursor","\tmem 71 _ 127. --make DEL the interrupt char (instead of ESC).","\tmem 272.  --get pointer to display control block","\tmem 65052.  --reads the first of 4 keyboard input words","\tmem 65048. --reads the word with mouse and keyset bits.'","\t","to mouse x (:x. CODE 35)","\t' \tx = 0-7  are a map on the mouse buttons. E.g. (4=mouse 4) comes","\tback true if the top mouse button is depressed, (1=mouse 1) comes","\tback true if bottom mouse button depressed, (7=mouse 7) comes","\tback true if all three mouse buttons depressed, etc.  Mouse 8","\treturns the x coordinate of the mouse and mouse 9 returns the y","\tcoordinate.'","to mx (!mouse 8)","to my (!mouse 9)","","to core ((mem 63)-mem 62)","\t'Returns the amount of space left in your Smalltalk.'","","to kbd i (\"i _ 0. CODE 20)","\t'Waits until a key is struck. Returns an ascii code when a key is","\tstruck on the keyboard.'","","to dsoff (mem 272_0)","\t'Turns display off by storing 0 in display control block ptr. Speeds","\tup Alto Smalltalk by factor of 2.'","","to dson (mem 272 _ 58)","\t'Turns display back on by refreshing display control block","\tpointer.'","","to apply x y  (:#x. %to?(:y. %in?(:GLOB. CODE 10) CODE 10)","\t\t%in?(:GLOB. CODE 10) CODE 10)","to evapply x y (:x. %to?(:y. %in?(:GLOB. CODE 10) CODE 10)","\t\t%in?(:GLOB. CODE 10) CODE 10)","\t'Causes its argument to be applied to the message stream of the","\tcaller, or, in the case of apply foo to <vector>, to that vector.\t","\tNote that only the message is changed, and that the caller is not","\tbypassed in any global symbol lookup unless the in-clause is used to","\tspecify another context.'","","\"true_\"true","\"eval_\"eval","to is ( %~?(!\"untyped):\". !false)","\t'These are used to handle messages to classes which can|t answer","\tqueston invoking \u000fis\u000f, \u000feval\u000f, etc.'","","to t nprint substr (ev).","t\t'prevent -to- from making these global.'"," ","to nprint digit n (:n=0?()","\t\"digit_n mod 10. nprint n/10. disp_48+digit)","PUT number \"nprint #nprint.","\t'Prints (non-neg) integers in decimal\twith leading zeroes suppressed\u0011'"," ","to substr op byte s lb ub s2 lb2 ub2 (","\t:#s. :lb. :ub. :MESS. \"GLOB_ub.  'tee hee'","\t:ub. (%]?() error \"(missing right bracket))","\t\"byte _ \"lb2 _ \"ub2 _ 1.","\t%find? (\"op _ (%first?(1) %last?(2) 1)","\t\t\t\t+ (%non?(2) 0). :byte. CODE 40)","\t%_?  (%all? (:byte. \"op_0. CODE 40)","\t\t:#s2. \"op_5.","\t\t%[? (:lb2. %to. :ub2. %].  CODE 40)","\t\t\t\"ub2_9999. CODE 40)","\t\"op _ 6.  CODE 40).","PUT string \"substr #substr.","PUT vector \"substr #substr.","done  'end of subevaluation in t'","","\t'substr takes care of copying, moving and searching within strings","\tand vectors.  It first gets its father (string/vector) and the lower","\tbound, and then proceeds to fetch the rest of the message from","\tabove.  Some examples:","\t\t\"(a b c d e)[2 to 3] -> (b c)","\t\t\"(a b c d e)[1 to 5] find \"c  -> 3","\t\t\"(a b c d e)[1 to 5] find \"x  -> 0","\tSee vecmod for more examples.  String syntax is identical.'"," ","to vecmod new end old posn ndel nins ins (\"end_10000.","\t:old. :posn. :ndel. :ins.","\t\"nins_(ins is vector?(ins length) 1).","\t\"new _ old[1 to old length+nins-ndel].","\t(ins is vector?(new[posn to end] _ ins[1 to nins]) new[posn]_ins).","\tnew[posn+nins to end] _ old[posn+ndel to end].","\t!new)","\t'Vecmod makes a copy of old vector with ndel elements deleted","\tbeginning at posn.  If ins is a vector, its elements are inserted\tat","\tthe same place. It is the heart of edit.'","","to addto func v w (:#func. :w. \"v_GET func \"DO. null v?(error \"(no code))","\tPUT func \"DO vecmod v v length 0 w)","\t'Addto appends code to a class definition.'","","","to fill t i l str ( ","    \"l _ :str length. \"i _ 0.","    repeat","      (i = l?(done)","      \"t _ kbd. str[\"i _ i + 1] _ t. disp _ t.  t=13?(done)).","    !str)","","","to stream in : i s l( ","   CODE 22","    '    CODE 22 is equivalent to...","    %_?","      (","        (i = l?","           (\"s _ s[1 to \"l _ 2 * l]))","       !s[\"i _ i + 1] _ :)","    %next?","      (i = l?(!0)","       !s[\"i _ i + 1])","    %contents?","      (!s[1 to i])'","    %reset?","      (\"i _ 0)","    isnew?","      (\"s _","        (%of?(:)","         string 10).","       \"i _","        (%from?((:)","            - 1)","         0).","       \"l _","        (%to?(:)","         s length))","    %is?","      (ISIT eval)","    %end?","      (!i = l)","    %print?","      (","        (i > 0?","           (s[1 to i] print)).","       disp _ 1.","       l < i + 1?()","       s[i + 1 to l] print))","","to obset i input : vec size end (","\t%add?((size=\"end_end+1?(\"vec_vec[1 to \"size_size+10]))","\t\tvec[end]_:)","\t%_?(0=vec[1 to end] find first :input?","\t\t(SELF add input))","\t%delete?(0=\"i_vec[1 to end] find first :input?(!false)","\t\tvec[i to end]_vec[i+1 to end+1]. \"end_end - 1)","\t%unadd?(\"input_vec[end]. vec[end]_nil.","\t\t\"end_end - 1. !input)","\t%vec?(!vec[1 to end])","\t%map?(:input. for i _ end to 1 by -1 (input eval))","\t%print?(SELF map \"(vec[i] print. sp))","\t%is?(ISIT eval)","\tisnew?(\"end_0. \"vec_vector \"size_4)","\t)","","to { set (\"set_stream of vector 10. repeat(","\t%}?(!set contents)","\tset _ :)","\t)","","","'PRETTY-PRINT"," ","\t\tThis prints the code; classprint makes the header.'","","to show func t (","\t:#func. \"t_GET func \"DO.","\tnull t ? (!\"(no code)) pshow t 0.)","to pshow ptr dent i t :: x tabin index (:ptr :dent.","\t(ptr length>4?(tabin dent)) disp_40.","\tfor i to ptr length","\t\t(\"t _ ptr[i].","\t\tt is vector ?(pshow t dent+3.","\t\t\ti=ptr length?()","\t\t\t\". = \"x_ptr[i+1]?()","\t\t\tx is vector?()","\t\t\ttabin dent)","\t\ti=1 ?(t print)","\t\t0<\"x_index \"(. , \u0013 [ ] ?) t?","\t\t\t(x=1?(t print. i=ptr length?()","\t\t\t\tptr[i+1] is vector?() tabin dent)","\t\t\tt print)","\t\t0=index \"(: \" # ! [ % ? &  ) ptr[i - 1]?(disp_32. t print)","\t\tt print)","\tdisp_41)","to t tabin index (ev)","t","to tabin n :: x (:n. disp_13. repeat","        (n > 6?","           (disp _ x[6].","            \"n _ n - 6)","         done)","      disp _ x[n + 1])","(PUT tabin \"x {string 0 fill string 1 fill string 2 fill string 3","\tfill string 4 fill string 5 fill string 6}).","                       'leave these blanks'","PUT pshow \"tabin #tabin.","to index op byte s lb ub s2 lb2 ub2 (","\t:s. :byte. \"op_\"lb_\"s2_\"lb2_\"ub2_1. \"ub_9999. CODE 40)","\t'A piece of substr which runs faster.'","PUT pshow \"index #index.","done","","'FLOATING POINT'","","to float x y : : fprint (CODE 42","       %ipow?","         (:x = 0?(!1.0)","          x = 1?()","          x > 1?","            (1 = x mod 2?","               (!SELF *(SELF * SELF)","                ipow x / 2)","             !(SELF * SELF)","             ipow x / 2)","          !1.0 / SELF ipow 0-x)","       %epart?","         (SELF < :x?(!0)","          SELF < x * x?(!1)","          !","            (\"y _ 2 * SELF epart x * x)","          +","            (SELF / x ipow y)","          epart x)","       %is?(ISIT eval)","       %print?","         (SELF = 0.0?(disp _ 48. disp_46. disp_48)","          SELF < 0.0?","            (disp _ 21.","             fprint - SELF)","          fprint SELF)","\t)","to t fprint (ev)","t","to fprint n i p q s : : fuzz ( ","    'Normalize to [1..10]'","      (:n < 1?","         (\"p _ -(10.0 / n)","          epart 10.0)","       \"p _ n epart 10.0)","       \"n _ fuzz + n / 10.0 ipow p.","    'Scientific or decimal'","      (\"q _ p.","       \"s _ fuzz*2.","       p > 6?","         (\"p _ 0)","       p < -3?","         (\"p _ 0)","       \"q _ 0.","       p < 0?","         (disp _ 48. disp_46.","          for i _ p to -2(disp _ 48))","       \"s _ s * 10.0 ipow p)","    'Now print (s suppresses trailing zeros)'","    for i to 9","      (disp _ 48 + n ipart.","       \"p _ p - 1.","       \"n _ 10.0 * n fpart.","       p < 0?","         (","            (p = -1?(disp _ 46))","          n < \"s _ 10.0 * s?(done)))","      (p = -1?(disp _ 48))","    q = 0?()","    disp_101.","    q print)","PUT fprint \"fuzz 5.0 * 10.0 ipow -9.","PUT float \"fprint #fprint.","done","    ","'TEXT DISPLAY ROUTINES","","Display frames are declared with five parameters. They are a left x, a width, a top y, a height, and a string.  Hence --","\t\"yourframe_dispframe 16 256 16 256 string 400.","-- gets you an area on the upper left portion of the display that starts at x,y 16,16 and is 256 bits(raster units) wide and 256 bits high. The string (buf) serves as the text buffer, and is altered by _ and scrolling.","","There are actually two entities associated with display frames--frames and windows. Currently both are given the same dimensions upon declaration (see isnew).  ","","The four instance variables defining the window are \u000fwinx\u000f, \u000fwinwd\u000f, \u000fwiny\u000f, and \u000fwinht\u000f.  The boundaries of this rectangle are intersected with the physical display.  The window actually used by the machine language will reduce the size of the window, if necessary, to be confined by the physical display.  Clipping and scrolling are done on the basis of window boundaries.  If a character is in the window it will be displayed.  If a string or character cause overflow of the bottom of the window, scrolling will occur.","","The four instance variables defining the frame are \u000ffrmx\u000f, \u000ffrmwd\u000f, \u000ffrmy\u000f, and \u000ffrmht\u000f.   This rectangle may be smaller or larger than its associated window as well as the physical display.   Frame boundaries are the basis for word-wraparound.  (Presently, if frmy+ frmht will cause overflow of the window bottom[winx+winht], frmht will get changed to a height consonant with the bottom of the window.  This has been done to manage scrolling, but may get changed as we get a better handle on the meaning of frames and windows.).","","\u000fBuf\u000f is the string buffer associated with any given instance of dispframe.  This is the string that is picked on the way to microcode scan conversion.  When scrolling occurs, the first line of characters, according to frame boundaries, is stripped out and the remainder of the buffer mapped back into itself.  If a \u000f_\u000f message would overflow this buffer, then scrolling will occur until the input fits.  ","","\u000fLast\u000f is a \u000fbuf\u000f subscript, pointing to the current last character in the buffer.  That is, the last character resulting from a \u000f_\u000f.","","\u000fLstln\u000f also points into the buffer at the character that begins the last line of text in the frame.  It is a starting point for scan conversion in the \u000f_\u000f call.","","\u000fMark\u000f  is set by dread (see below) and points to the character in the buffer which represents the last prompt output by SMALLTALK; reading begins there. Mark is updated by scrolling, so that it tracks the characters.  One could detect scrolling by watching mark.","","\u000fCharx\u000f and \u000fchary\u000f  reflect right x and top y of the character pointed to by \u000flast\u000f.","","The \u000freply\u000f variable in the instance may be helpful in controlling things.  When the reply is 0, it means everything should be OK. That is, there was intersection between the window and display and intersection between the window and the frame. When reply is 1, there was no intersection between the window and the display. A 2 reply means no intersection between window and frame. A 3 reply means window height less than font height -- hence no room for scan conversion of even one line of text. A 4 means that the frame height has been increased in order to accomodate the input. A 5 means the bottom of the window (i.e. window x + window height) has been overflowed --hence that scrolling took place. A 6 means that both 4 and 5 are true.","","\u000fjustify\u000f is a toggle for right justifying the  contents of a dispframe.  The default is  0 and means no justification.  Setting it to 1 causes justification on frame boundaries.","","The \u000ffont\u000f variable allows for the association of a font other than the default font with the display frame.  To get a different font into core say \"something _ file <fontfilename> intostring. Then you can say disp\u0013 (\"font_something) or you can declare the font at the same time as the tdispframe is declared as e.g."," \"yourframe _ dispframe 3 40 3 40 string 20 font something.'  ","","","to dispframe input : winx winwd winy winht frmx frmwd frmy frmht last mark lstln charx chary reply justify buf font editor : sub frame dread reread defont (","% _ ?(0 CODE 51)","\t':s. s is number ? (append this ascii char)","\t\ts is string ?(append string)","\t\terror.'","","%\u0013?(! \u0003 eval)","\t'Allows access to instance variables. For example, ","\t\tyourframe\u0013 (\"winx_32) ","\twill alter the value of window x in the instance of dispframe","\tcalled \"yourframe\".'","","%show?(4 CODE 51 3 CODE 51)","","%display?(SELF show. frame black)","\t'Show clears the intersection of window and frame (see fclear,","\tbelow) and displays buf from the beginning through last. A handy","\tway to clean up a cluttered world.'","","%hasmouse?(frmx<mx<frmx+frmwd?(!frmy<my<frmy+frmht)!false)","\t'Tells you if the mouse is within a frame.'","","%fclear?(4 CODE 51)","\t'Fclear clears the intersection of the window and frame. Hence if","\tthe frame is defined as smaller than the window, only the frame","\tarea will be cleared.  If the frame is defined as larger than the","\twindow, only the window area will be cleared, since that space","\tis in fact your \u000fwindow\u000f on that frame.'","","%put?(:input. %at. \"winx_\"frmx_:. \"winy_\"frmy_\"chary_:.","\t\"last_0. \"lstln_1. SELF_input. !charx-winx)","\t'For them as would rather do it themselves.'","","%wclear?(5 CODE 51)","\t'Wclear clears the intersection of a window and the physical","\tdisplay.'","","%scroll?(2 CODE 51)","\t'Scroll removes the top line of text from the frame|s string buffer,","\tand moves the text up one line.'","","%clear?(1 CODE 51)","\t'Clear does an fclear and sets the \u000flast\u000f pointer into the string buffer","\tto 0 and \u000flstln\u000f to 1. It has the effect of cleaning out the string","\tbuffer as well as clearing the frame area.'","","%mfindc ?(7 CODE 51)","\t' \tFind character.","\tTakes two arguments -- x and y (typically msex and msey).","\tReturns vector:","\t\tvec[1] = subscript of char in string","\t\tvec[2] = left x of char","\t\tvec[3] = width of char","\t\tvec[4] = topy of char","\tIf vec[1] is -1 x,y is after the end of the string.","\tIf vec[2] is -2 x,y is not in the window.","\tSample call:","\t\t\"myvec_yourframe mfindc mx my.'","","%mfindw ?(8 CODE 51)","\t' \tFind word.","\tTakes two arguments -- x and y (typically msex and msey).","\tReturns vector:","\t\tvec[1] = subscript of first char in word","\t\tvec[2] = left x of word","\t\tvec[3] = width of word","\t\tvec[4] = topy of word","\tIf vec[1] is -1 x,y is after the end of the string.","\tIf vec[2] is -2 x,y is not in the window.","\tSample call:","\t\t\"myvec_yourframe mfindw mx my.'","","%mfindt ?(6 CODE 51)","\t' \tFind token.","\tTakes two arguments -- x and y (typically msex and msey).","\tReturns vector:","\t\tvec[1] = token count, ala Smalltalk token Spaces and","\t\t\tcarriage returns are  considered as delimiters,but","\t\t\tmultiple delimiters do not bump the count. Text","\t\t\tdelimited by single quotes is counted as one","\t\t\ttoken, and embedded text (i.e. more than one","\t\t\tquote in sequence will not cause the token count","\t\t\tto be bumped (allows for embedding strings","\t\t\twithin strings).","\t\tvec[2] = left x of word","\t\tvec[3] = width of word","\t\tvec[4] = topy of word","","\tIf vec[1] is -1 x,y is after the end of the string or not in frame.","\tIf vec[2] is -2 x,y is not in the window.","\tA sample call--","\t\t\"variable_yourframe mfindt mx my.'","","%read?(!dread)","\t'Makes a code vector out of keyboard input. See dread below.'","","%reread?(!reread :)","\t'Used by redo and fix.  Goes back n(its argument), prompts and does","\ta read from there. See reread below.'","","%sub?(\"input _ sub :. SELF show. !input)","\t'Evals its argument in a sub-window.  Used by fix and shift-esc.","\t See sub below.'","","%knows?(ev)","\t'Whilst at the KEYBOARD, one can say ","\t\t\u000fyourframe knows(DOIT)\u000f","\tand get a copy of the evaluator in the context of that instance of","\tdispframe.  Allows access to instance variables without going through","\tthe \u0013 path.'","","%frame ? (apply frame)","\t'Draws a border of the given color around the frame.  E.g., ","\t\tyourframe frame - 1.'","","%is ?(ISIT eval)","","isnew ? (\"winx_:frmx. \"winwd_:frmwd. \"chary_\"winy_:frmy.","\t\"winht_:frmht. :buf. \"lstln_1.","\t\"mark_\"last_\"charx_\"reply_\"justify_0.","\t\"font _ (%font?(:input is string?(input) defont)defont)","\t%noframe?() frame black)  ))"," ","dispframe knows","to dread t instr prev (","\tdisp_20. \"instr_false. \"mark_last.","\t(null #DRIBBLE?() DRIBBLE flush)","\trepeat (\"prev _ buf[last].","\t\t40>disp_\"t_kbd?(","\t\tt=8?(last<mark?(disp_20) ","\t\t'\tBackspace only up to prompt.'","\t\t\tprev=39?(\"instr_instr is false))","\t\t\t'\t\tBackspace out of string flips instr.'","\t\tt=30?(instr?() done)  ","\t\t'\tDOIT checks if in a string.'","\t\tt=39?(\"instr_instr is false)","\t\t'\tFlag is true if in a string'","\t\tt=5?(sub \"(ev). \"last_last - 1. disp show)","\t\t'\tShift-Esc make sub-eval.'","\t\tt=4?(disp_8. \"done print. disp_30. !\"(done))","\t\t))","\tdisp_13. !read of buf [mark+1 to last - 2])","","to sub disp (","\t\"disp_dispframe winx+48 winwd - 64 winy+14 winht - 28","\t\t\tstring 300 font font. ","\tdisp clear. (:)eval)","\t'Opens a sub-frame, and evals its argument in that context.'","","to frame a (\"a _ turtle at frmx - 1 frmy - 1.","\ta width 2 . a ink (%white?(\"white) %black. \"black).","\tdo 2 (a turn 90 go frmwd + 2 turn 90 go frmht + 2)\t)","\t'Draws a double line around the frame.'","","","to reread n i p reader ((null :n?(\"n_1))","\trepeat (buf[last] = 20?(disp _ 8. done) disp _ 8).","\t\"p _ last.","\tfor i to n","\t\t(\"p_buf[1 to p - 1] find last 20.","\t\tp<1?(done))","\ti<n?(error \"(no code))","\t!read of buf [p+1 to buf[p+1 to last] find 30])","\t'Counts back n prompts (n is integer arg) and then does a read from","\tthere. Also erases the line just typed.'","","\"defont _ fill string 6","ST8.AL","","done"," ","to read str ((%of?(:str)). CODE 2)","\t'Adds the ability to read from a supplied string'","","to dclear (0 CODE 52)","\t'This function takes five parameters -- ","\tx width y height value, and \u000fclears\u000f the display rectangle thus","\tdefined to the \u000fvalue\u000f given. A 0 value, for example, puts all","\tzeros into  the rectangle.'","","","to dcomp (1 CODE 52)","\t'Just like dclear only complement rectangle.'","","","to dmove (2 CODE 52)","\t'This function takes six parameters -- source x width source y","\theight destination x destination y.  It takes the source rectangle","\t(x and width mod 16|d as in dclear) and moves it to the destination","\tx and y. Clipping will occur on display boundaries. The source will","\tremain intact unless  it overlaps with the destination, in which case","\tthe over- lapping portion of the destination wins.'","","to dmovec (3CODE 52)","\t'Dmovec takes the same parameters as dmove, but in addition clears","\tthe non-intersecting source material. It is the general case of what","\thappens on the display screen during a scroll, i.e. scrolling could be","\taccomplished by saying disp\u0013 (dmovec winx winwd winy+fontheight","\twinht-fontheight winx winy). A sample call --","\t\tdmovec 0 256 0 256 256 256. ","\tThis will move whatever is in the upper left hand corner of the","\tdisplay to x,y   256,256 -- and then erase the source area. '",""," ","to redo (!(disp reread :) eval)","\t'Causes re-evaluation of the input typed n prompts before this.","\tSetting last_mark-2 makes the redo statement and its prompt","\tdisappear with a disp show.'","","to fix vec (\"vec_disp reread :.","\t(disp sub \"(veced vec)) eval)","\t'Like redo, except that the previous input is given to the editor in a","\tsubwindow.  When editing is done, the resulting code is evalled","\tbefore returning.'"," ","","'TURTLES'","","to turtle var : pen ink width dir x xf y yf frame : f (","\tCODE 21  '%go?(draw a line of length :)","\t          %turn?(turn right : (degrees))","\t          %goto?(draw a line to :(x), :(y))'","\t%pendn?(\"pen _ 1. !SELF)","\t%penup?(\"pen _ 0. !SELF)","\t%ink?(%_. :ink.  !SELF)","\t%width?(%_. :width.  !SELF)","\t%xor?(\"xor _ (%off?(0) 1). !SELF)","\t%is?(ISIT eval)","\t%home?(\"x _ frame \u0013 frmwd/2.","\t       \"y _ frame \u0013 frmht/2.","\t       \"xf _ \"yf _ 0. \"dir_270. !SELF)","\t%erase?(frame fclear. !SELF)","\t%up?(\"dir _ 270. !SELF)","\tisnew?(\"ink _ \"black. \"pen _ \"width _ 1. \"xor _ 0.","\t\t(%frame?(\"frame _ :) \"frame _ f)","\t\t%at?(:x. :y. \"dir_270)","\t\tSELF home)","\t)","PUT turtle \"f dispframe 0 512 0 512 string 1 noframe.","\"@ _ turtle.","","","'THE TRUTH ABOUT FILES","","a file is found in a directory (\u000fdirinst\u000f) by its file name (\u000ffname\u000f), and has a one \u000fpage\u000f, 512 character string (\u000fsadr\u000f).  \u000frvec\u000f is an optional vector of disk addresses used for random page access.","","\"fi _"," <directory> file <string> old -- finds an old file named <string> in <directory> or returns false if does not exist or a disk error occurs.","","\"fi _"," <directory> file <string> new -- creates a new file or returns false if it already exists.  if neither old or new is specified, an existing file named <string> will be found or a new file created. if <directory> is not specified, the current default directory is used.","","<directory> file <string> delete -- deletes a file from a directory and deallocates its pages.  do not delete the system directory (SYSDIR.) or bittable (SYS.STAT.), or any directories you create.","","<directory> file <string> rename <string> -- renames file named by first string in <directory> with second string. currently not implemented for directory files.","","<directory> file <string> load -- loads a previously \u000fsaved\u000f memory image (Swat format), thereby destroying your current state.","","<directory> file <string> save -- saves your Smalltalk memory.","","\u000fleader\u000f and \u000fcuradr\u000f are the alto disk addresses of page 0 and the current page of the file, respectively.  \u000fbytec\u000f is a character index into \u000fsadr\u000f.","","\u000fdirty\u000f = 1 if any label block integers (\u000fnextp\u000f thru \u000fsn2\u000f) have been changed; = -1 if \u000fsadr\u000f has been changed; = 0 if the current page is clean.  the user need not worry about this unless (s)he deals directly with the label or \u000fsadr\u000f. it might be noted here that multiple instances of the same file do not know of each others activities or \u000fsadr|s.","","\u000fstatus\u000f is normally 0, -1 if end occurred with the last \u000fset\u000f; a positive number (machine language pointer to offending disk command block (dcb)) signals a disk error.","","the next 8 integers are the alto disk label block.  \u000fnextp\u000f and \u000fbackp\u000f are the forward and backward alto address pointers. \u000flnused\u000f is currently unused. \u000fnumch\u000f is number of characters on the current page, numch must be 512, except on the last page. \u000fpagen\u000f is the current page number. page numbers are non-negative integers, and the format demands that the difference in consecutive page numbers is 1. normal file access starts at page 1, although all files possess page 0 (the \u000fleader\u000f page). \u000fversion\u000f numbers > 1 are not implemented. \u000fsn1\u000f and \u000fsn2\u000f are the unique 2-word serial number for the file. ","","the class function \u000fncheck\u000f checks that file names contain alphabetic or \u000flegal\u000f characters or digits, and end with a period.'","","","(to file : dirinst fname sadr rvec leader curadr bytec dirty status nextp","\tbackp lnused numch pagen version sn1 sn2 : ncheck x (","","\t%_? (17 CODE 50)","\t\t'\tfi_<integer>, <string>, or <file> --  ","\t\t:x is string? (for i to x length (SELF_x[i]))","\t\tx is file? (repeat (x end? (done) SELF_x next))","\t\t(numch<\"bytec_bytec+1? ","\t\t  (SELF set to write (pagen+bytec/512) bytec mod 512))","\t\tsadr[bytec]_x &*  255'","","\t%next? ((%word? (%_? (7)","\t\t\t'\t\tfi next word_<integer> -- write integer.","\t\t\tpossibly increment pointer to word boundary.","\t\t\t(0=bytec &*  1? () \"bytec_bytec+1)","\t\t\tSELF _ :x/256. SELF _ x mod 256.'","","\t\t\t 6)","\t\t\t'\t\tfi next word -- read an integer","\t\t\t(0=bytec &*  1? () \"bytec_bytec+1)","\t\t\t!(SELF next*256) + SELF next'","","\t\t  %into? (16)","\t\t\t'\t\tfi next into <string> -- read a string","\t\t\tfor i to :x length(x[i]_SELF next).!x'","","\t\t  25) CODE 50)","\t\t\t'\t\tfi next -- read a character","\t\t\t(numch<\"bytec_bytec+1?","\t\t\t (SELF set to read (pagen+bytec/512) ","\t\t\t   bytec mod 512? () !0))  !sadr[bytec]'","","\t%set? (%to. (%end?(13)","\t\t\t'\t\tfi set to end -- set file pointer to end of file.","\t\t\tSELF set to read 16383 0'","","\t\t %write?(5) ","\t\t\t'\t\tfi set to write <integer> <integer> -- set file","\t\t\tpointer to :spage :schar. if current page is dirty,","\t\t\tor \u000freset\u000f, \u000fset to end\u000f or page change","\t\t\toccurs, flush current page. read pages until","\t\t\tpagen=spage. allocate new pages after end if","\t\t\tnecessary (-1 512 is treated as start of next","\t\t\tpage, i.e. pagen+1 0). \"bytec_schar'","","\t\t%read. 4) CODE 50)","\t\t\t'\t\tsame as \u000fwrite\u000f except stop at end'","","\t%skipnext? (18 CODE 50)","\t\t'\tfi skipnext <integer> -- set character pointer relative to","\t\tcurrent position. (useful for skipping rather than reading,","\t\tor for reading and backing up, but \u000fend\u000f may not work if","\t\t\u000fbytec\u000f points off the current page)  \"bytec_ bytec + :.'","","\t%end? (10 CODE 50)","\t\t'\tfi end -- return false if end of file has not occurred.","\t\tnextp=0? (bytec<numch?(!false))!false'","","\t%\u0013? (! :\"  eval)","","\t%flush? (12 CODE 50)","\t\t'\tfi flush -- dirty=0? () write current page'","","\t%writeseq? (22 CODE 50)","\t\t'\ttransfer words from memory to a file","\t\t:adr. :count. for i_adr to adr+count - 1","\t\t(SELF next word _ mem i)'","","\t%readseq? (21 CODE 50)","\t\t'\t...from a file to memory...(mem i _ SELF next word)'","","\t%is? (ISIT eval)","","\t%remove? (dirinst forget SELF)","\t\t'\tremove file from filesopen list of directory'","","\t%close? (dirinst \u0013 bitinst flush.","\t\t SELF flush. SELF remove. !\"closed)","\t\t'\tfi close or \"fi_fi close (if fi is global) -- flush bittable","\t\tand current page, remove instance from filesopen list of","\t\tdirectory'","","\t%shorten? (%to. %here? (SELF shorten pagen bytec) 14 CODE 50)","\t\t'\tfi shorten to <integer> <integer> -- shorten a file SELF set","\t\tto read :spage :schar. \"x_nextp. \"nextp_0.","\t\t\"numch_schar. \"dirty_1. deallocate x and successors'","","\t%print? (disp _ fname)","\t\t'\tfile prints its name'","","\t%reset? (11 CODE 50)","\t\t'\tfi reset -- reposition to beginning of file","\t\tSELF set 1 0'","","\t%intostring?(SELF set to end.","  \t\t\"x _ string bytec + 512 * pagen - 1.","    \t\tSELF reset.  !SELF next into x)","","\t%random? (SELF set to end. \"rvec _ vector pagen.","\t\t  for x to rvec length (SELF set x 0. rvec[x] _ curadr))","\t\t'\tfi random -- initialize a random access vector to be used","\t\tin fi set...  new pages appended to the file will not be","\t\trandomly accessed'","","\t%pages? (20 CODE 50)","\t\t'\tfi pages <integer> ... <integer> -- out of the same great","\t\ttradition as \u000fmem\u000f comes the power to do potentially","\t\tcatastrophic direct disk i/o (not for the faint-hearted).","\t\t :coreaddress. :diskaddress. :diskcommand. :startpage.","\t\t:numberofpages. :coreincrement. if -1 =  coreaddress,","\t\tcopy \u000fsadr\u000f to a buffer before the i/o call. diskaddress","\t\t(=-1 yields \u000fcuradr\u000f) and diskcommand are the alto disk","\t\taddress and command. startpage is relevant if label checking","\t\tis performed. numberofpages is the number of disk pages","\t\tto process. coreincrement is usually 0 (for writing in same","\t\tbuffer) or 256 for using consecutive pages of core.  use","\t\tlabel block from instance of \u000ffi\u000f. copy label block from","\t\tinstance. perform i/o call. copy \u000fcuradr\u000f and label block","\t\tinto instance. if -1=coreaddress copy buffer to \"sadr\".' ","","\tisnew? (\"fname_ncheck :. fname is false?","\t\t\t(error \"(bad file name) !nil) ","\t\t(null \"dirinst _ #curdir? ","\t\t\t(\"dirinst _ directory \u0013 defdir.  dirinst open)).","\t\t\t'\t\tset directory instance for file. if curdir is nil","\t\t\tbecause file was not called from the context of a ","\t\t\tdirectory instance, use the default directory'","","\t\t%exists? (24 CODE 50. !fname)","\t\t\t'\t\treturn false if file name does not occur in the","\t\t\tdirectory'","","\t\t%delete? (15 CODE 50. !\"deleted)","\t\t\t'\t\tdelete a file (see intro)'","","\t\t\"sadr _ (%using? (:) string 512).","\t\t\t'\t\tset up file string buffer'","","\t\t%rename? (\"x _ ncheck :. x is false?","\t\t\t\t(error \"(bad new name)!nil)","\t\t\t  file x exists? (error \"(name already in use))","\t\t\t  2 CODE 50.  \"fname _ x.  23 CODE 50.","\t\t\t  SELF set 0 12.  SELF _ fname length.","\t\t\t  SELF _ fname.  SELF flush.  !fname)","\t\t\t'\t\tcheck that the new name is not already in use.","\t\t\tlookup the original file and change its name in its","\t\t\tdirectory, and in its leader page'","","\t\t %load? (2 CODE 50. 8 CODE 50)","\t\t\t'\t\tlookup an old file and load (overlay) a Swat","\t\t\tmemory image; return via save.'","","\t\t(%old? (2)","\t\t sadr[13] _ fname length.","\t\t sadr[14 to 13 + fname length] _ fname.","\t\t %new? (dirinst \u0013 filinst is file? (3) 19)","\t\t 1) CODE 50.","\t\t\t'\t\tfind an old file or add a new entry (with its","\t\t\tname as a BCPL string in its leader page. special","\t\t\thandling for new directories). machine code may","\t\t\treturn false'","","\t\t%save? (SELF set to write 256 0.  SELF reset.","\t\t\tdirinst close.  9 CODE 50)","","\t\t\t'\t\tallocate a file, close the directory (other files","\t\t\te.g. DRIBBLE, and directories should be already","\t\t\tclosed), and write out the memory image as a Swat","\t\t\tfile.  when arriving here from a \u000fload\u000f, return false;","\t\t\totherwise return the file instance.'","","\t\t%intostring?(!SELF intostring)","\t\tdirinst remember SELF) ))","\t\t\t'\t\tfinally, file puts itself into the filesopen list of its","\t\t\tdirectory'","file \u0013(ev)","to ncheck str i x :: legal (\"str_:.","\t(str is string?(str length < 255?() !false) !false)","\tfor i to str length","\t\t(\"x _ str[i].","\t\t96 < x < 123 ? ('lowercase')","\t\t 47 < x <  58 ? ('digit')","\t  \t   0 < legal[1 to 6] find x ? ('legal')","\t\t64 < x < 91 ? ('uppercase')","\t\t!false)","\tx=46?(!str) !str+ \".chars)","'check that the file name is a proper length string containing only lower/upper case letters, digits, or legal characters. if name does not end with a period, append one.'","","PUT ncheck \"legal fill string 6","+-$!?.   ","done","","","to error adr ptr arec class :: c shocode find sub (","\t%knows?(!ev)","\t:ptr. \"arec_leech AREC.","\tdisp sub \"((0=adr?(ptr print)","\t\tmem 66_0. disp_255 &*  mem adr.","\t\tfor adr_adr+1 to adr+(mem adr)&/ -9 (","\t\t\t\"ptr_mem adr.","\t\t\tdisp_ptr&/ -8. disp_ptr&*  255))","\tcr c ev))  ","error knows","to c class code cpc (","\tnull arec[5]?(.) \"arec_leech arec[5]. \"class_arec[0].","\t(GET class \"TITLE) print. \": print.","\tarec[6] is vector?(find arec[1]&   arec[6] ? (shocode))","\tfind arec[1]&   GET class \"DO ? (shocode).","\t)","to shocode i (","\tfor i_1 to code length","\t\t(i<cpc - 5?(disp_46) i>cpc+5?(disp_46)","\t\tsp. (i=cpc?(disp_25))","\t\tcode[i] is vector?(\"$ print) code[i] print).","\t)","to find adr vec vadr l (","\t'a tree search in vec for the address adr'","\t\"adr_:. \"l_leech :vec.","\tvec is vector is false?(!false)","\t\"vadr_(leech l)[1]&   +1.","\t(adr>vadr?(adr<vadr+vec length+1?","\t\t(\"cpc _ adr-vadr. \"l_0. \"code_vec. !true)))","\t\"l_0. for l to vec length","\t\t(vec[l] is vector?(find adr vec[l]?(!true)))","\t!false)","to sub disp (\"disp _ GET USER \"disp. (:) eval)","done"," ","to kbck i (\"i _ 1. CODE 20)","\t'Returns true if the keyboard has been hit.'","","to button n (!:n=mouse 7)","\t'Returns true if that pattern is being held down'","","","'THE SMALLTALK EDITOR ---'"," "," ","to edit func t (:#func. ","\t\"t_GET func \"DO. ","\tnull t ? (!\"(no code))","\t%title? ((veced classprint func header) eval)","\tPUT func \"DO veced t. ","\t!\"edited)  ","\t'Edit picks up a code vector, makes sure it is not empty and calls","\tveced to edit the code body.  If you say edit foo title, veced will","\tedit the header as well, and the changed form will be evalled upon","\texit to redefine the function, title and all.","","\tVeced can be used on any vector, and is used by FIX as well as","\tEDIT.  It creates two new windows within the default DISP which","\texists when it is called.  One is used for a menu of commands,","\tthe other becomes the new default window DISP. The new default","\tis passed to an intermediary; and the newly edited vector is","\treturned.'","","(to veced back newdisp  menu x ::  menuwidth menulen menustr","ed edtarget gettwo bugin getvec  (","\t%knows?(ev)","\t\"back_false. ","\tdisp fclear.","\tdisp\u0013 (\"menu_dispframe winx+winwd-menuwidth menuwidth","\t\t\twiny (winht>139?(winht) 140) string 70","\t\t\tfont font.","\t\tmenu _ menustr.","\t\t\"newdisp _ dispframe winx winwd-menuwidth+2","\t\t\twiny winht string buf length ","\t\t\tfont font noframe)","\t:x. \"x _ indisp newdisp (ed x). ","\tdisp show.","\t!x)   )","","","veced knows","","\"menuwidth _ 64.","\"menustr_string 0.","\"menulen _ 10.","do menulen (\"x_fill string 9.","\t\"menustr_menustr+x[1 to x[1 to 9]find 13])."," Add"," Insert"," Replace"," Delete"," Move"," Up"," Push"," Enter"," Leave"," Exit","","to indisp disp (:disp. ! \u0003 eval)","\t'used to make DISP a new local.'","","to ed ptr l n nrun command temp i nv n1 fnth hfnth   (","\t\"command _ 0.","\t:ptr. ","\t\"fnth _ 18.","\t\"hfnth _ fnth/2.","\trepeat(","\t\t\"l_ptr length.","\t\tback?(done with ptr) ","\t\tmenu show. disp clear","\t\t\"nv_0.","\t\tfor n to l","\t\t\t(ptr[n] is vector?(disp_36. sp","\t\t\t\t\"nv_nv+1. \"n1_n)","\t\t\tptr[n] print. disp_32) ","\t\tcr cr.","\t\t\"command _ edcomp bugin menu menulen both.","","\t\t\"(  ","\t\t(\"ptr_vecmod ptr l+1 0 read) ","\t\t(\"ptr_vecmod ptr edcomp edtarget both 0 read) ","\t\t(gettwo.  \"ptr_vecmod ptr n nrun read)","\t\t(gettwo. \"ptr_vecmod ptr n nrun vector 0)","\t\t(gettwo. \"temp _ ptr[n to n+nrun - 1]","\t\t\t\"i_edcomp edtarget both.","\t\t\t\"ptr_vecmod ptr n nrun vector 0.","\t\t\t(i>n ? (\"i_i-nrun))","\t\t\t\"ptr_vecmod ptr i 0 temp)","\t\t(getvec?(\"ptr_vecmod ptr n 1 ptr[n]) again) ","\t\t(gettwo. \"temp_vector 1. ","\t\t\ttemp[1]_ ptr[n to n+nrun - 1].","\t\t\t\"ptr_vecmod ptr n nrun temp)","\t\t(getvec?(ptr[n]_ed ptr[n]) again)","\t\t(done with ptr)\t","\t\t(\"back_true. done with ptr)","\t\t\t) [command] eval.","\t\t)","\t)","\t'The heart of ED is a vector, containing as its elements code","\tvectors.  The giant vector is indexed to get the particular piece of","\tprogram, and it is sent the message EVAL.  Note that the order of","\tthe segments in ED1 should match the order of the atom names in","\tMENUVEC.'","","","to gettwo t1 n2 (\"n_edcomp edtarget top. ","                 \"n2_edcomp edtarget bot.","\t\"nrun _ 1+n2-n.","\tnrun<1?(\"n_n2. \"nrun_2-nrun))","","to bugin  someframe  max index(","\t:someframe.","\t\"max _ 1+:.","\trepeat (button 0 ? (repeat (","\t\t\tbutton 7 ?(disp sub \"(ev))","\t\t\tbutton 0 ?()","\t\t\tdone) ","\t\tdone) ","\t\t) ","        \"index_someframe mfindt mx my","\t0<index[1]< max ?","\t\t(!index)","\t'returns token index, if within range, else'","\tagain","\t'causes an exit out of this command by restarting ed|s","\trepeat'","\t)","","to edtarget (! bugin disp l)"," ","to getvec (nv=1?(\"n_n1. !true)","\t!ptr[\"n_edcomp edtarget both] is vector)","","to edcomp compvec y hth (:compvec.","\t\"y_compvec[4].","\t\"hth_(%both?(fnth)%top?(hfnth)","\t\t%bot?(\"y_y+hfnth. hfnth))","","\tdcomp compvec[2] compvec[3] y hth","\t!compvec[1]","\t)","done","","'BOOTSTRAPPING REVISITED'","","to classprint fn a b i j k flags clsv clsm arecv arecm instv instm code (","\t:#fn. \"code _ GET fn \"DO. null code?(\"(no code))","\t\"a_leech #fn. \"b_vector 1. \"b_leech b.  \"clsm_\"arecm_\"instm_0.","\t\"k_a[1]&  . \"clsv_vector k. \"arecv_vector k. \"instv_vector k.","\t'Pull symbols out of class table'","\tfor i_4 to 4+2*k by 2","\t'k is no. dbl entries -1, here'","\t\t(\"k_a[i]&  .","\t\tk = -1?(again).  \"flags _ k&/ -14.","\t\t'\t0=class, 2=arec, 3=inst'","\t\tflags=0?(0=\"(DO TITLE ARSIZE) [1 to 3] find a[i]?","\t\t\t(clsv[\"clsm_clsm+1] _ a[i]))","\t\tb[2]&   _ k&*2047.  \"j_a[i+1]&  .","\t\t(flags=2?(arecv[j - 6] _ b[2]. arecm<j - 6?(\"arecm_j - 6))","\t\t\tinstv[j+1] _ b[2]. instm<j+1?(\"instm_j+1))","\t\t)","","\t'Now make up input form.'","\t\"a _ vector 6+arecm+instm+clsm.","\ta[1] _ \"to. a[2] _ GET fn \"TITLE.","\ta[3 to \"j_2+arecm] _ arecv.","\t(0<instm+clsm? (a[\"j_j+1]_\":. a[j+1 to \"j_j+instm] _ instv.","\t\t0<clsm? (a[\"j_j+1]_\":. a[j+1 to \"j_j+clsm] _ clsv)))","\t%header?(a[j+1]_code. !a)","\tfor i to j (a[i] print. disp_32)","\tshowpretty?(pshow code 3) code print)"," ","to nshow showpretty (\"showpretty_true. showev  :\" )"," ","to showev shAtom shVal (:shAtom. cr.","\t(shAtom is atom?","\t\t(\"shVal _ shAtom eval.","\t\t(null GET shVal \"DO?","\t\t\t(\"\" print. shAtom print. \"_ print.","\t\t\t(shVal is vector? (\"\" print)","\t\t\t\tnull shVal?(\"nil print))","\t\t\tshVal print. \". print)","\t\tclassprint shVal))","\tshAtom print)","\tdisp_30.)","","to filout disp flist i showpretty (\"showpretty _ %pretty.","\tdsoff (:disp is string? (\"disp_file disp? () error \"(file error)))","\t(%add?(disp set to end))","\t(null :flist?(defs map \"(showev vec[i]. cr))","\t(flist is atom? (showev flist. \"flist_flist eval))","\tfor i to flist length - 1 (showev flist[i]. cr)) ","\tdisp shorten to here. disp close. dson.)","\t'Filout basically does a show in an environment where the display is","\treplaced by a file. filout pretty <file> or <string = file name> add","\t<vector> if \u000fpretty\u000f is used, the text representation is neater but","\ttakes longer to generate. if \u000fadd\u000f is used, function definitions are","\tappended to the file. if <vector> is not specified, \u000fdefs\u000f is","\tused.'"," ","to filin fi :: ev (%\u0013?(! \u0003 eval)","     dsoff. ","    (:fi is string?(\"fi _ file fi old?()","\t\tdson !false))","    repeat","      (fi end?(done)","       dsoff.","       cr (read of fi) eval print.","       dson).","    fi close.","   )","filin\u0013 (to ev (repeat(cr (read of fi) eval print)))","","\t'Filin basically does a read-eval-print loop, but gets its input from a","\tfile instead of a dispframe.'","","to type f t ((:f is string?(","\t\t\"f _ file f old?(f remove)","\t\t!false))","\t\"t_string 30.","\trepeat(f end?(done) disp_f next into t))","","to t fool  :: fontname ('dispframe \u0013 (\"defont _  file fontname intostring).'","\t\"disp_dispframe 16 480 514 184 string 520.","\tdisp _ version. \"defs _ obset.","\tto to toAtm (CODE 19 defs_toAtm. toAtm)","\tto read str (%of?(:str. CODE 2) ! disp read)","\tPUT USER \"DO \"(repeat (cr read eval print)). \"t_0.)","PUT t \"fontname fill string 6","ST8.AL","\"version_fill string 34","Welcome to SMALLTALK [May 5]               ","","to quit f s t : : r b   (dsoff.","      (null :s?()","       \"f _ file r.","       \"t _ f intostring.","       f reset.","       f _ s.","       f _ 13.","       f _ t.","       f close).","    file b load)","PUT quit \"r fill string 7","REM.CM.","PUT quit \"b fill string 5","BOOT.","","to os s : : r b   (\"s _ :.","    file b save?","      (quit s + r))","PUT os \"b fill string 9","BREAK.SV.","PUT os \"r fill string 17",";RESUME BREAK.SV.","","\"fill _ nil","","'Then execute...","\tt. USER","...to install the ST dispframe and start the read-eval-print loop in ST.","When restarting from errors, execute...","\tdisp show. disp frame. USER","'"],"layout":{"__isSmartRef__":true,"id":258},"stepCount":0,"ST72Object":null,"_Rotation":0,"_Scale":1,"inputLength":1342,"__serializedExpressions__":["_Position","distanceToDragEvent"],"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":259},"__LivelyClassName__":"lively.morphic.Box","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(6.0,25.0)","distanceToDragEvent":"lively.pt(414.0,-15.0)"},"42":{"storedTextString":"'This file is an annotated version of sysdefs.\rComments (by Dan Ingalls and Diana Merry) are in string-quotes like this.\rThe code portion of this file is copyright Xerox Corp. 1974'\r\r'Phase I.\rThe bootstrap process sets up a global dictionary.  It then reads input lines, looking specifically for the defining word, \"to\", and calling its code directly.'\r\rto to x (CODE 19)\r'Now definitions can be made by evaluating \"to\" in ST code'\r\rto read (CODE 2)\r'Read input into a vector.  The bootstrap reader is almost identical in function to the SMALLTALK read routine, except that DOIT is signalled by <CR> at zero-th parenthesis level, and single-quote strings are ignored.'\r\rto vector (CODE 3)\r'This defines the eval method (and more that will be described later) for code vectors.'\r\rto USER (read eval)\r'This is the top-level user program.  Its class variables also serve as the global symbol table (also known in the interpreter as TopLev).'\r\r'Phase II.\rAs soon as USER has been defined (ie from here on), it provides the code to execute in each cycle of Smalltalk execution.'\r\rto isnew (CODE 5)\r\rto falseclass (isnew)\r\rto atom x y (CODE 29)\r\r'** skipped** \"false _ falseclass.'\r\rto print (%..)\r\t':x.Print its address in octal.\r\tPrinting goes to the same place as CODE 20. This is used primarily\r\tfor bootstrapping. All system classes will print themselves.'\r\r\r \r\r'MESSAGE HANDLING'\r\rto : (CODE 18)\r\t'to : name\r\r\t%\" ?(:\"name nil ?(!name_caller message quotefetch)\r\t\t\t\t(!caller message quotefetch))\r\r\tFetch the next thing in the message stream unevaluated\r\tand bind it to the name if one is there.\r\r\t%# ?(:\"name nil ?(!name_caller message referencefetch)\r\t\t\t\t(!caller message referencefetch))\r\r\tFetch the reference to next thing in the message stream\r\tand bind it to the name if one is there.\r\r\t\t(:\"name nil ?(!name_ caller message evalfetch)\r\t\t\t!caller message evalfetch)\r\r\tFetch the next thing in the message stream evaluated\r\tand bind it to the name if one is there.'\r\rto % (CODE 17)\r\t':\"token. token=caller.message.code[caller.message.pc]?\r\t\t(caller.message.pc_caller.message.pc+1. !true) !false.\r\tThat is, if a match for the token is found in the message, then\r \tgobble it up and return true, else return false.'\r\rto \u0003 (CODE 36)\r\t'Fetch the next token quoted -- equivalent to (:\").'\r\rto ! (CODE 13)\r\t':x. then do a return, and apply x to any further message. Note\r\tthat in (... !x+3. \"y_y-2), the assignment to y will never\r\thappen, since ! causes a return.'\r\rto \" (CODE 9)\r\t'!:\". That is, get the next thing in the message stream unevalled\r\tand active return it (which\tcauses it to be applied to the message).'\r\rto # (:# )\r\t'Returns a REFERENCE to its arguments binding.'\r\r\r'CONTROL CLASSES'\r \rto repeat token (:#token. CODE 1)\r\t'repeat (token eval) Not a true apply to eval, and therefore token\r\tMUST be a vector.'\r\rto done x (%with?(:x. CODE 25) CODE 25)\r\t'done causes a pop out of the nearest enclosing repeat, for, or do.  \r\t\u000fdone with val\u000f will cause the repeat to have value val'\r\rto again (CODE 6)\r\t'repeat (\"active_active caller. eq active. class #repeat?(done)).\r\tThat is, redo the most recent repeat, for, or do loop.'\r\rto if exp (:exp?(%then?(:exp. %else?(:\". exp)exp)error \"(no then))\r\t\t%then?(:\".   %else?(:exp) false)error \"(no then))\r\t'The ALGOL \u000fif ... then ... else ...\u000f'\r\rto for token step stop var start exp (\r\t:\"var. (%_?(:start.)\"start_1).\r\t(%to?(:stop.)\"stop_start.)\r\t(%by?(:step.)\"step_1.)\r\t%do. :#exp. CODE 24)\r\t'An Algol-like \u000ffor\u000f.\r\tNote the default values if \u000f_\u000f,\u000fto\u000f,\u000fby\u000f,etc., are omitted.\r\tCODE 24 means  --repeat(exp eval).\tThis implies \u000fdone\u000f and \u000fagain\u000f\r\twill work, which is correct.'\r\rto do token step stop var start exp (\r\t\"step_\"start_1. :stop. :#exp. CODE 24)\r\r\r\r'INITIALIZING SYSTEM CLASSES\r\r\r\t\tHere are the main kludges which remain from the time when we\r\treally didn|t understand classes very well, but wanted a working\r\tSMALLTALK. PUT and GET are two of the principle actions of class\r\tclass. The new verson of SMALLTALK will have class as a class\r\twith these actions intensional.'\r\rto PUT x y z (:#x. :y. :z. CODE 12)\r\t'The first argument MUST be an atom which is bound to a class\r\ttable.  The third argument is installed in the value side of that table\r\tcorresponding to the name (atom) which was the second argument.'  \r\rto GET x y (:#x. :y. CODE 28)\r\t'If \u000fx\u000f is a class table then the binding of the atom in \u000fy\u000f will be\r\tfetched.'\r\rto leech field bits : ptr (\r\tisnew?(:ptr)\r\tCODE 27)\r\t'Lets you subscript any instance\r\ta[0] gives you the class, a[1] gives the first field, etc.\r\ta[2] gives you the pointer; a[2]&   returns the BITS in an integer\r\ta[2]_foo will dereference count previous contents, but a[2]&_ foo\r\twill not.'\r\rto atom x y (CODE 29\r\t'%_?(:x.  !x -- Lookup SELF and replace its value by x.)\r\t%eval?(! -- Lookup the binding of SELF)\r\t%=?(!SELF=:)\r\t%chars?(! -- printname of SELF (a string))'\r\r\t%is?(ISIT eval)\r\t%print?(disp_SELF chars) )\r\t'Done this way (PUT used rather than using \u000fto\u000f) because we\r\twanted to know where the system classes are. Hence the initial\r\t\u000fto atom x y ()\u000f , for example, in \u000fBootstrapping Magic\u000f followed\r\tby the behavior here.'\r\rto falseclass (CODE 11\r\t'%?? (:\".)\r\t%or? (!:)\r\t%and? (:.)\r\t%<? (:.)\r\t%=? (:.)\r\t%>? (:.)'\r\r\tisnew.\r\t%is?(%false?(!true) %~? (!\"false) :\".)\r\t%print?(\"false print) )\r\rto vector x y : : substr (CODE 3 ?(!substr SELF x GLOB MESS)\r\t'isnew?(Allocate vector of length :.\r\t\tFill vector with nils.)\r\t%[?(:x. %].\r\t\t(%_?(:y. !y -- store y into xth element. )\r\t\t!  xth element) )\r\t%length?(! length of string or vector)\r\t%eval?(\"pc_0. repeat\r\t\t(null SELF[\"pc_pc+1]?(done)\r\t\t\"val_SELF[pc] eval)\r\t\t!val) sort of...'\r\t%is?(ISIT eval)\r\t%print?(disp_40. for x to SELF length\r\t\t(disp_32. SELF[x] print). disp_41)\r\t%map?(:y. for x to SELF length\r\t\t(evapply SELF[x] to y)) )\r\rto string x y : : substr (CODE 3 ?(!substr SELF x GLOB MESS)\r\r\t'isnew?(Allocate string of length :.\r\t\tFill string with 255s.)\r\t%[?(:x. %].\r\t\t(%_?(:y. !y -- store y into xth element. )\r\t\t!  xth element) )\r\t%length?(! length of string or vector)'\r\r\t%is?(ISIT eval)\r\t%print?(0 = \"x _ SELF[1 to 9999] find first 39?\r\t\t (disp _ 39. disp _ SELF. disp _ 39)\r\t\t SELF[1 to x - 1] print. SELF[x+1 to SELF length] print)\r\t%=?(:y is string?(SELF length=y length?(\r\t\tfor x to SELF length (SELF[x]=y[x]?() !false)) !false)\r\t\t!false)\r\t%+?(:y is string?(\"x_SELF[1 to SELF length+y length].\r\t\t!x[SELF length+1 to x length]_y[1 to y length])\r\t\terror \"(string not found)) )\r\rto number x y : : nprint (CODE 4\r\t'%+?(!val+:)\r\t%-?(!val-:)\r\t%*?(!val*:)\r\t%/?(!val/:)\r\t%<?(!val<:)\r\t%=?(!val=:\r\t%>?(!val>:)\r\t%&  ?(%+?(!val OR :)\r\t\t%-?(!val XOR :)\r\t\t%*?(!val AND :)\r\t\t%/?(!val LSHIFT :)))'\r\r\t%is?(ISIT eval)\r\t%print?(SELF>0?(nprint SELF)\r\t\tSELF=0?(disp_48)\r\t\tdisp_21. nprint 0-SELF) )\r\t'For floating point stuff see FLOAT'\r\rto disp x i (\r\t%_?(:x is string?(for i to x length (disp_x[i])) CODE 23)\r\t%clear?() %sub?(:x eval))\r\t'Writes a character or string to the bootstrap printer.\r\tLater it will redefined as a \u000fdisplay frame.\u000f'\r\rto cr (disp_13)\rto sp (disp_32)\r\rto ev (repeat (cr read eval print))\r\rto USER (ev)\r\r'The top-level user process is now defined.\rThe bootstrap reader stops here, and USER starts to run.'\r\rto - x (:x*-1)\r\t'An often used abbreviation, has to work for float as well.'\r\rto base8 i x s (:x. \"s_string 7. for i to 7\r\t(s[8-i] _ 48 + x &* 7. \"x _ x &/ -3). !s)\r\t'Returns a string containing the octal representation (unsigned) of its\r\tinteger argument.'\r \r\r\"ISIT _ \"(%~?(!TITLE) !TITLE=:\").\r\rto nil x (#x)\r\t'nil is an \u000funbound pointer\u000f, which is used\tto fill vectors and\r\ttables.'\r\rto eq (CODE 15)\r\t'(! : is-identical-to :) - compare 2 SMALLTALK pointers.'\r\rto null x y (:x. ! eq #x #y)\r\t'Null returns true if its message is \u000fnil\u000f, otherwise false.'\r\r'UTILITIES'\r \rto mem x y (:x. CODE 26)\r\t'to mem x y (:x. %_?(!core/mem x _:)!core/mem x)\r\tmem loads integers from and stores them into real core.\r\tTee hee...\r\tmem 280 _ 0  --set alto clock to zero\r\tmem 280  ;read the clock\r\tfor i to 16 (mem 280+i _ cursor[i])  --put new bits into cursor\r\tmem 276 _ mem 277 _ 0.  --reset mouse x and y to 0.\r\tmem 69 _ 0.  --disconnect cursor from mouse\r\tmem 278 _ x. mem 0427 _ y.  --move the cursor\r\tmem 71 _ 127. --make DEL the interrupt char (instead of ESC).\r\tmem 272.  --get pointer to display control block\r\tmem 65052.  --reads the first of 4 keyboard input words\r\tmem 65048. --reads the word with mouse and keyset bits.'\r\t\rto mouse x (:x. CODE 35)\r\t' \tx = 0-7  are a map on the mouse buttons. E.g. (4=mouse 4) comes\r\tback true if the top mouse button is depressed, (1=mouse 1) comes\r\tback true if bottom mouse button depressed, (7=mouse 7) comes\r\tback true if all three mouse buttons depressed, etc.  Mouse 8\r\treturns the x coordinate of the mouse and mouse 9 returns the y\r\tcoordinate.'\rto mx (!mouse 8)\rto my (!mouse 9)\r\rto core ((mem 63)-mem 62)\r\t'Returns the amount of space left in your Smalltalk.'\r\rto kbd i (\"i _ 0. CODE 20)\r\t'Waits until a key is struck. Returns an ascii code when a key is\r\tstruck on the keyboard.'\r\rto dsoff (mem 272_0)\r\t'Turns display off by storing 0 in display control block ptr. Speeds\r\tup Alto Smalltalk by factor of 2.'\r\rto dson (mem 272 _ 58)\r\t'Turns display back on by refreshing display control block\r\tpointer.'\r\rto apply x y  (:#x. %to?(:y. %in?(:GLOB. CODE 10) CODE 10)\r\t\t%in?(:GLOB. CODE 10) CODE 10)\rto evapply x y (:x. %to?(:y. %in?(:GLOB. CODE 10) CODE 10)\r\t\t%in?(:GLOB. CODE 10) CODE 10)\r\t'Causes its argument to be applied to the message stream of the\r\tcaller, or, in the case of apply foo to <vector>, to that vector.\t\r\tNote that only the message is changed, and that the caller is not\r\tbypassed in any global symbol lookup unless the in-clause is used to\r\tspecify another context.'\r\r\"true_\"true\r\"eval_\"eval\rto is ( %~?(!\"untyped):\". !false)\r\t'These are used to handle messages to classes which can|t answer\r\tqueston invoking \u000fis\u000f, \u000feval\u000f, etc.'\r\rto t nprint substr (ev).\rt\t'prevent -to- from making these global.'\r \rto nprint digit n (:n=0?()\r\t\"digit_n mod 10. nprint n/10. disp_48+digit)\rPUT number \"nprint #nprint.\r\t'Prints (non-neg) integers in decimal\twith leading zeroes suppressed\u0011'\r \rto substr op byte s lb ub s2 lb2 ub2 (\r\t:#s. :lb. :ub. :MESS. \"GLOB_ub.  'tee hee'\r\t:ub. (%]?() error \"(missing right bracket))\r\t\"byte _ \"lb2 _ \"ub2 _ 1.\r\t%find? (\"op _ (%first?(1) %last?(2) 1)\r\t\t\t\t+ (%non?(2) 0). :byte. CODE 40)\r\t%_?  (%all? (:byte. \"op_0. CODE 40)\r\t\t:#s2. \"op_5.\r\t\t%[? (:lb2. %to. :ub2. %].  CODE 40)\r\t\t\t\"ub2_9999. CODE 40)\r\t\"op _ 6.  CODE 40).\rPUT string \"substr #substr.\rPUT vector \"substr #substr.\rdone  'end of subevaluation in t'\r\r\t'substr takes care of copying, moving and searching within strings\r\tand vectors.  It first gets its father (string/vector) and the lower\r\tbound, and then proceeds to fetch the rest of the message from\r\tabove.  Some examples:\r\t\t\"(a b c d e)[2 to 3] -> (b c)\r\t\t\"(a b c d e)[1 to 5] find \"c  -> 3\r\t\t\"(a b c d e)[1 to 5] find \"x  -> 0\r\tSee vecmod for more examples.  String syntax is identical.'\r \rto vecmod new end old posn ndel nins ins (\"end_10000.\r\t:old. :posn. :ndel. :ins.\r\t\"nins_(ins is vector?(ins length) 1).\r\t\"new _ old[1 to old length+nins-ndel].\r\t(ins is vector?(new[posn to end] _ ins[1 to nins]) new[posn]_ins).\r\tnew[posn+nins to end] _ old[posn+ndel to end].\r\t!new)\r\t'Vecmod makes a copy of old vector with ndel elements deleted\r\tbeginning at posn.  If ins is a vector, its elements are inserted\tat\r\tthe same place. It is the heart of edit.'\r\rto addto func v w (:#func. :w. \"v_GET func \"DO. null v?(error \"(no code))\r\tPUT func \"DO vecmod v v length 0 w)\r\t'Addto appends code to a class definition.'\r\r\rto fill t i l str ( \r    \"l _ :str length. \"i _ 0.\r    repeat\r      (i = l?(done)\r      \"t _ kbd. str[\"i _ i + 1] _ t. disp _ t.  t=13?(done)).\r    !str)\r\r\rto stream in : i s l( \r   CODE 22\r    '    CODE 22 is equivalent to...\r    %_?\r      (\r        (i = l?\r           (\"s _ s[1 to \"l _ 2 * l]))\r       !s[\"i _ i + 1] _ :)\r    %next?\r      (i = l?(!0)\r       !s[\"i _ i + 1])\r    %contents?\r      (!s[1 to i])'\r    %reset?\r      (\"i _ 0)\r    isnew?\r      (\"s _\r        (%of?(:)\r         string 10).\r       \"i _\r        (%from?((:)\r            - 1)\r         0).\r       \"l _\r        (%to?(:)\r         s length))\r    %is?\r      (ISIT eval)\r    %end?\r      (!i = l)\r    %print?\r      (\r        (i > 0?\r           (s[1 to i] print)).\r       disp _ 1.\r       l < i + 1?()\r       s[i + 1 to l] print))\r\rto obset i input : vec size end (\r\t%add?((size=\"end_end+1?(\"vec_vec[1 to \"size_size+10]))\r\t\tvec[end]_:)\r\t%_?(0=vec[1 to end] find first :input?\r\t\t(SELF add input))\r\t%delete?(0=\"i_vec[1 to end] find first :input?(!false)\r\t\tvec[i to end]_vec[i+1 to end+1]. \"end_end - 1)\r\t%unadd?(\"input_vec[end]. vec[end]_nil.\r\t\t\"end_end - 1. !input)\r\t%vec?(!vec[1 to end])\r\t%map?(:input. for i _ end to 1 by -1 (input eval))\r\t%print?(SELF map \"(vec[i] print. sp))\r\t%is?(ISIT eval)\r\tisnew?(\"end_0. \"vec_vector \"size_4)\r\t)\r\rto { set (\"set_stream of vector 10. repeat(\r\t%}?(!set contents)\r\tset _ :)\r\t)\r\r\r'PRETTY-PRINT\r \r\t\tThis prints the code; classprint makes the header.'\r\rto show func t (\r\t:#func. \"t_GET func \"DO.\r\tnull t ? (!\"(no code)) pshow t 0.)\rto pshow ptr dent i t :: x tabin index (:ptr :dent.\r\t(ptr length>4?(tabin dent)) disp_40.\r\tfor i to ptr length\r\t\t(\"t _ ptr[i].\r\t\tt is vector ?(pshow t dent+3.\r\t\t\ti=ptr length?()\r\t\t\t\". = \"x_ptr[i+1]?()\r\t\t\tx is vector?()\r\t\t\ttabin dent)\r\t\ti=1 ?(t print)\r\t\t0<\"x_index \"(. , \u0013 [ ] ?) t?\r\t\t\t(x=1?(t print. i=ptr length?()\r\t\t\t\tptr[i+1] is vector?() tabin dent)\r\t\t\tt print)\r\t\t0=index \"(: \" # ! [ % ? &  ) ptr[i - 1]?(disp_32. t print)\r\t\tt print)\r\tdisp_41)\rto t tabin index (ev)\rt\rto tabin n :: x (:n. disp_13. repeat\r        (n > 6?\r           (disp _ x[6].\r            \"n _ n - 6)\r         done)\r      disp _ x[n + 1])\r(PUT tabin \"x {string 0 fill string 1 fill string 2 fill string 3\r\tfill string 4 fill string 5 fill string 6}).\r                       'leave these blanks'\rPUT pshow \"tabin #tabin.\rto index op byte s lb ub s2 lb2 ub2 (\r\t:s. :byte. \"op_\"lb_\"s2_\"lb2_\"ub2_1. \"ub_9999. CODE 40)\r\t'A piece of substr which runs faster.'\rPUT pshow \"index #index.\rdone\r\r'FLOATING POINT'\r\rto float x y : : fprint (CODE 42\r       %ipow?\r         (:x = 0?(!1.0)\r          x = 1?()\r          x > 1?\r            (1 = x mod 2?\r               (!SELF *(SELF * SELF)\r                ipow x / 2)\r             !(SELF * SELF)\r             ipow x / 2)\r          !1.0 / SELF ipow 0-x)\r       %epart?\r         (SELF < :x?(!0)\r          SELF < x * x?(!1)\r          !\r            (\"y _ 2 * SELF epart x * x)\r          +\r            (SELF / x ipow y)\r          epart x)\r       %is?(ISIT eval)\r       %print?\r         (SELF = 0.0?(disp _ 48. disp_46. disp_48)\r          SELF < 0.0?\r            (disp _ 21.\r             fprint - SELF)\r          fprint SELF)\r\t)\rto t fprint (ev)\rt\rto fprint n i p q s : : fuzz ( \r    'Normalize to [1..10]'\r      (:n < 1?\r         (\"p _ -(10.0 / n)\r          epart 10.0)\r       \"p _ n epart 10.0)\r       \"n _ fuzz + n / 10.0 ipow p.\r    'Scientific or decimal'\r      (\"q _ p.\r       \"s _ fuzz*2.\r       p > 6?\r         (\"p _ 0)\r       p < -3?\r         (\"p _ 0)\r       \"q _ 0.\r       p < 0?\r         (disp _ 48. disp_46.\r          for i _ p to -2(disp _ 48))\r       \"s _ s * 10.0 ipow p)\r    'Now print (s suppresses trailing zeros)'\r    for i to 9\r      (disp _ 48 + n ipart.\r       \"p _ p - 1.\r       \"n _ 10.0 * n fpart.\r       p < 0?\r         (\r            (p = -1?(disp _ 46))\r          n < \"s _ 10.0 * s?(done)))\r      (p = -1?(disp _ 48))\r    q = 0?()\r    disp_101.\r    q print)\rPUT fprint \"fuzz 5.0 * 10.0 ipow -9.\rPUT float \"fprint #fprint.\rdone\r    \r'TEXT DISPLAY ROUTINES\r\rDisplay frames are declared with five parameters. They are a left x, a width, a top y, a height, and a string.  Hence --\r\t\"yourframe_dispframe 16 256 16 256 string 400.\r-- gets you an area on the upper left portion of the display that starts at x,y 16,16 and is 256 bits(raster units) wide and 256 bits high. The string (buf) serves as the text buffer, and is altered by _ and scrolling.\r\rThere are actually two entities associated with display frames--frames and windows. Currently both are given the same dimensions upon declaration (see isnew).  \r\rThe four instance variables defining the window are \u000fwinx\u000f, \u000fwinwd\u000f, \u000fwiny\u000f, and \u000fwinht\u000f.  The boundaries of this rectangle are intersected with the physical display.  The window actually used by the machine language will reduce the size of the window, if necessary, to be confined by the physical display.  Clipping and scrolling are done on the basis of window boundaries.  If a character is in the window it will be displayed.  If a string or character cause overflow of the bottom of the window, scrolling will occur.\r\rThe four instance variables defining the frame are \u000ffrmx\u000f, \u000ffrmwd\u000f, \u000ffrmy\u000f, and \u000ffrmht\u000f.   This rectangle may be smaller or larger than its associated window as well as the physical display.   Frame boundaries are the basis for word-wraparound.  (Presently, if frmy+ frmht will cause overflow of the window bottom[winx+winht], frmht will get changed to a height consonant with the bottom of the window.  This has been done to manage scrolling, but may get changed as we get a better handle on the meaning of frames and windows.).\r\r\u000fBuf\u000f is the string buffer associated with any given instance of dispframe.  This is the string that is picked on the way to microcode scan conversion.  When scrolling occurs, the first line of characters, according to frame boundaries, is stripped out and the remainder of the buffer mapped back into itself.  If a \u000f_\u000f message would overflow this buffer, then scrolling will occur until the input fits.  \r\r\u000fLast\u000f is a \u000fbuf\u000f subscript, pointing to the current last character in the buffer.  That is, the last character resulting from a \u000f_\u000f.\r\r\u000fLstln\u000f also points into the buffer at the character that begins the last line of text in the frame.  It is a starting point for scan conversion in the \u000f_\u000f call.\r\r\u000fMark\u000f  is set by dread (see below) and points to the character in the buffer which represents the last prompt output by SMALLTALK; reading begins there. Mark is updated by scrolling, so that it tracks the characters.  One could detect scrolling by watching mark.\r\r\u000fCharx\u000f and \u000fchary\u000f  reflect right x and top y of the character pointed to by \u000flast\u000f.\r\rThe \u000freply\u000f variable in the instance may be helpful in controlling things.  When the reply is 0, it means everything should be OK. That is, there was intersection between the window and display and intersection between the window and the frame. When reply is 1, there was no intersection between the window and the display. A 2 reply means no intersection between window and frame. A 3 reply means window height less than font height -- hence no room for scan conversion of even one line of text. A 4 means that the frame height has been increased in order to accomodate the input. A 5 means the bottom of the window (i.e. window x + window height) has been overflowed --hence that scrolling took place. A 6 means that both 4 and 5 are true.\r\r\u000fjustify\u000f is a toggle for right justifying the  contents of a dispframe.  The default is  0 and means no justification.  Setting it to 1 causes justification on frame boundaries.\r\rThe \u000ffont\u000f variable allows for the association of a font other than the default font with the display frame.  To get a different font into core say \"something _ file <fontfilename> intostring. Then you can say disp\u0013 (\"font_something) or you can declare the font at the same time as the tdispframe is declared as e.g.\r \"yourframe _ dispframe 3 40 3 40 string 20 font something.'  \r\r\rto dispframe input : winx winwd winy winht frmx frmwd frmy frmht last mark lstln charx chary reply justify buf font editor : sub frame dread reread defont (\r% _ ?(0 CODE 51)\r\t':s. s is number ? (append this ascii char)\r\t\ts is string ?(append string)\r\t\terror.'\r\r%\u0013?(! \u0003 eval)\r\t'Allows access to instance variables. For example, \r\t\tyourframe\u0013 (\"winx_32) \r\twill alter the value of window x in the instance of dispframe\r\tcalled \"yourframe\".'\r\r%show?(4 CODE 51 3 CODE 51)\r\r%display?(SELF show. frame black)\r\t'Show clears the intersection of window and frame (see fclear,\r\tbelow) and displays buf from the beginning through last. A handy\r\tway to clean up a cluttered world.'\r\r%hasmouse?(frmx<mx<frmx+frmwd?(!frmy<my<frmy+frmht)!false)\r\t'Tells you if the mouse is within a frame.'\r\r%fclear?(4 CODE 51)\r\t'Fclear clears the intersection of the window and frame. Hence if\r\tthe frame is defined as smaller than the window, only the frame\r\tarea will be cleared.  If the frame is defined as larger than the\r\twindow, only the window area will be cleared, since that space\r\tis in fact your \u000fwindow\u000f on that frame.'\r\r%put?(:input. %at. \"winx_\"frmx_:. \"winy_\"frmy_\"chary_:.\r\t\"last_0. \"lstln_1. SELF_input. !charx-winx)\r\t'For them as would rather do it themselves.'\r\r%wclear?(5 CODE 51)\r\t'Wclear clears the intersection of a window and the physical\r\tdisplay.'\r\r%scroll?(2 CODE 51)\r\t'Scroll removes the top line of text from the frame|s string buffer,\r\tand moves the text up one line.'\r\r%clear?(1 CODE 51)\r\t'Clear does an fclear and sets the \u000flast\u000f pointer into the string buffer\r\tto 0 and \u000flstln\u000f to 1. It has the effect of cleaning out the string\r\tbuffer as well as clearing the frame area.'\r\r%mfindc ?(7 CODE 51)\r\t' \tFind character.\r\tTakes two arguments -- x and y (typically msex and msey).\r\tReturns vector:\r\t\tvec[1] = subscript of char in string\r\t\tvec[2] = left x of char\r\t\tvec[3] = width of char\r\t\tvec[4] = topy of char\r\tIf vec[1] is -1 x,y is after the end of the string.\r\tIf vec[2] is -2 x,y is not in the window.\r\tSample call:\r\t\t\"myvec_yourframe mfindc mx my.'\r\r%mfindw ?(8 CODE 51)\r\t' \tFind word.\r\tTakes two arguments -- x and y (typically msex and msey).\r\tReturns vector:\r\t\tvec[1] = subscript of first char in word\r\t\tvec[2] = left x of word\r\t\tvec[3] = width of word\r\t\tvec[4] = topy of word\r\tIf vec[1] is -1 x,y is after the end of the string.\r\tIf vec[2] is -2 x,y is not in the window.\r\tSample call:\r\t\t\"myvec_yourframe mfindw mx my.'\r\r%mfindt ?(6 CODE 51)\r\t' \tFind token.\r\tTakes two arguments -- x and y (typically msex and msey).\r\tReturns vector:\r\t\tvec[1] = token count, ala Smalltalk token Spaces and\r\t\t\tcarriage returns are  considered as delimiters,but\r\t\t\tmultiple delimiters do not bump the count. Text\r\t\t\tdelimited by single quotes is counted as one\r\t\t\ttoken, and embedded text (i.e. more than one\r\t\t\tquote in sequence will not cause the token count\r\t\t\tto be bumped (allows for embedding strings\r\t\t\twithin strings).\r\t\tvec[2] = left x of word\r\t\tvec[3] = width of word\r\t\tvec[4] = topy of word\r\r\tIf vec[1] is -1 x,y is after the end of the string or not in frame.\r\tIf vec[2] is -2 x,y is not in the window.\r\tA sample call--\r\t\t\"variable_yourframe mfindt mx my.'\r\r%read?(!dread)\r\t'Makes a code vector out of keyboard input. See dread below.'\r\r%reread?(!reread :)\r\t'Used by redo and fix.  Goes back n(its argument), prompts and does\r\ta read from there. See reread below.'\r\r%sub?(\"input _ sub :. SELF show. !input)\r\t'Evals its argument in a sub-window.  Used by fix and shift-esc.\r\t See sub below.'\r\r%knows?(ev)\r\t'Whilst at the KEYBOARD, one can say \r\t\t\u000fyourframe knows(DOIT)\u000f\r\tand get a copy of the evaluator in the context of that instance of\r\tdispframe.  Allows access to instance variables without going through\r\tthe \u0013 path.'\r\r%frame ? (apply frame)\r\t'Draws a border of the given color around the frame.  E.g., \r\t\tyourframe frame - 1.'\r\r%is ?(ISIT eval)\r\risnew ? (\"winx_:frmx. \"winwd_:frmwd. \"chary_\"winy_:frmy.\r\t\"winht_:frmht. :buf. \"lstln_1.\r\t\"mark_\"last_\"charx_\"reply_\"justify_0.\r\t\"font _ (%font?(:input is string?(input) defont)defont)\r\t%noframe?() frame black)  ))\r \rdispframe knows\rto dread t instr prev (\r\tdisp_20. \"instr_false. \"mark_last.\r\t(null #DRIBBLE?() DRIBBLE flush)\r\trepeat (\"prev _ buf[last].\r\t\t40>disp_\"t_kbd?(\r\t\tt=8?(last<mark?(disp_20) \r\t\t'\tBackspace only up to prompt.'\r\t\t\tprev=39?(\"instr_instr is false))\r\t\t\t'\t\tBackspace out of string flips instr.'\r\t\tt=30?(instr?() done)  \r\t\t'\tDOIT checks if in a string.'\r\t\tt=39?(\"instr_instr is false)\r\t\t'\tFlag is true if in a string'\r\t\tt=5?(sub \"(ev). \"last_last - 1. disp show)\r\t\t'\tShift-Esc make sub-eval.'\r\t\tt=4?(disp_8. \"done print. disp_30. !\"(done))\r\t\t))\r\tdisp_13. !read of buf [mark+1 to last - 2])\r\rto sub disp (\r\t\"disp_dispframe winx+48 winwd - 64 winy+14 winht - 28\r\t\t\tstring 300 font font. \r\tdisp clear. (:)eval)\r\t'Opens a sub-frame, and evals its argument in that context.'\r\rto frame a (\"a _ turtle at frmx - 1 frmy - 1.\r\ta width 2 . a ink (%white?(\"white) %black. \"black).\r\tdo 2 (a turn 90 go frmwd + 2 turn 90 go frmht + 2)\t)\r\t'Draws a double line around the frame.'\r\r\rto reread n i p reader ((null :n?(\"n_1))\r\trepeat (buf[last] = 20?(disp _ 8. done) disp _ 8).\r\t\"p _ last.\r\tfor i to n\r\t\t(\"p_buf[1 to p - 1] find last 20.\r\t\tp<1?(done))\r\ti<n?(error \"(no code))\r\t!read of buf [p+1 to buf[p+1 to last] find 30])\r\t'Counts back n prompts (n is integer arg) and then does a read from\r\tthere. Also erases the line just typed.'\r\r\"defont _ fill string 6\rST8.AL\r\rdone\r \rto read str ((%of?(:str)). CODE 2)\r\t'Adds the ability to read from a supplied string'\r\rto dclear (0 CODE 52)\r\t'This function takes five parameters -- \r\tx width y height value, and \u000fclears\u000f the display rectangle thus\r\tdefined to the \u000fvalue\u000f given. A 0 value, for example, puts all\r\tzeros into  the rectangle.'\r\r\rto dcomp (1 CODE 52)\r\t'Just like dclear only complement rectangle.'\r\r\rto dmove (2 CODE 52)\r\t'This function takes six parameters -- source x width source y\r\theight destination x destination y.  It takes the source rectangle\r\t(x and width mod 16|d as in dclear) and moves it to the destination\r\tx and y. Clipping will occur on display boundaries. The source will\r\tremain intact unless  it overlaps with the destination, in which case\r\tthe over- lapping portion of the destination wins.'\r\rto dmovec (3CODE 52)\r\t'Dmovec takes the same parameters as dmove, but in addition clears\r\tthe non-intersecting source material. It is the general case of what\r\thappens on the display screen during a scroll, i.e. scrolling could be\r\taccomplished by saying disp\u0013 (dmovec winx winwd winy+fontheight\r\twinht-fontheight winx winy). A sample call --\r\t\tdmovec 0 256 0 256 256 256. \r\tThis will move whatever is in the upper left hand corner of the\r\tdisplay to x,y   256,256 -- and then erase the source area. '\r\r \rto redo (!(disp reread :) eval)\r\t'Causes re-evaluation of the input typed n prompts before this.\r\tSetting last_mark-2 makes the redo statement and its prompt\r\tdisappear with a disp show.'\r\rto fix vec (\"vec_disp reread :.\r\t(disp sub \"(veced vec)) eval)\r\t'Like redo, except that the previous input is given to the editor in a\r\tsubwindow.  When editing is done, the resulting code is evalled\r\tbefore returning.'\r \r\r'TURTLES'\r\rto turtle var : pen ink width dir x xf y yf frame : f (\r\tCODE 21  '%go?(draw a line of length :)\r\t          %turn?(turn right : (degrees))\r\t          %goto?(draw a line to :(x), :(y))'\r\t%pendn?(\"pen _ 1. !SELF)\r\t%penup?(\"pen _ 0. !SELF)\r\t%ink?(%_. :ink.  !SELF)\r\t%width?(%_. :width.  !SELF)\r\t%xor?(\"xor _ (%off?(0) 1). !SELF)\r\t%is?(ISIT eval)\r\t%home?(\"x _ frame \u0013 frmwd/2.\r\t       \"y _ frame \u0013 frmht/2.\r\t       \"xf _ \"yf _ 0. \"dir_270. !SELF)\r\t%erase?(frame fclear. !SELF)\r\t%up?(\"dir _ 270. !SELF)\r\tisnew?(\"ink _ \"black. \"pen _ \"width _ 1. \"xor _ 0.\r\t\t(%frame?(\"frame _ :) \"frame _ f)\r\t\t%at?(:x. :y. \"dir_270)\r\t\tSELF home)\r\t)\rPUT turtle \"f dispframe 0 512 0 512 string 1 noframe.\r\"@ _ turtle.\r\r\r'THE TRUTH ABOUT FILES\r\ra file is found in a directory (\u000fdirinst\u000f) by its file name (\u000ffname\u000f), and has a one \u000fpage\u000f, 512 character string (\u000fsadr\u000f).  \u000frvec\u000f is an optional vector of disk addresses used for random page access.\r\r\"fi _\r <directory> file <string> old -- finds an old file named <string> in <directory> or returns false if does not exist or a disk error occurs.\r\r\"fi _\r <directory> file <string> new -- creates a new file or returns false if it already exists.  if neither old or new is specified, an existing file named <string> will be found or a new file created. if <directory> is not specified, the current default directory is used.\r\r<directory> file <string> delete -- deletes a file from a directory and deallocates its pages.  do not delete the system directory (SYSDIR.) or bittable (SYS.STAT.), or any directories you create.\r\r<directory> file <string> rename <string> -- renames file named by first string in <directory> with second string. currently not implemented for directory files.\r\r<directory> file <string> load -- loads a previously \u000fsaved\u000f memory image (Swat format), thereby destroying your current state.\r\r<directory> file <string> save -- saves your Smalltalk memory.\r\r\u000fleader\u000f and \u000fcuradr\u000f are the alto disk addresses of page 0 and the current page of the file, respectively.  \u000fbytec\u000f is a character index into \u000fsadr\u000f.\r\r\u000fdirty\u000f = 1 if any label block integers (\u000fnextp\u000f thru \u000fsn2\u000f) have been changed; = -1 if \u000fsadr\u000f has been changed; = 0 if the current page is clean.  the user need not worry about this unless (s)he deals directly with the label or \u000fsadr\u000f. it might be noted here that multiple instances of the same file do not know of each others activities or \u000fsadr|s.\r\r\u000fstatus\u000f is normally 0, -1 if end occurred with the last \u000fset\u000f; a positive number (machine language pointer to offending disk command block (dcb)) signals a disk error.\r\rthe next 8 integers are the alto disk label block.  \u000fnextp\u000f and \u000fbackp\u000f are the forward and backward alto address pointers. \u000flnused\u000f is currently unused. \u000fnumch\u000f is number of characters on the current page, numch must be 512, except on the last page. \u000fpagen\u000f is the current page number. page numbers are non-negative integers, and the format demands that the difference in consecutive page numbers is 1. normal file access starts at page 1, although all files possess page 0 (the \u000fleader\u000f page). \u000fversion\u000f numbers > 1 are not implemented. \u000fsn1\u000f and \u000fsn2\u000f are the unique 2-word serial number for the file. \r\rthe class function \u000fncheck\u000f checks that file names contain alphabetic or \u000flegal\u000f characters or digits, and end with a period.'\r\r\r(to file : dirinst fname sadr rvec leader curadr bytec dirty status nextp\r\tbackp lnused numch pagen version sn1 sn2 : ncheck x (\r\r\t%_? (17 CODE 50)\r\t\t'\tfi_<integer>, <string>, or <file> --  \r\t\t:x is string? (for i to x length (SELF_x[i]))\r\t\tx is file? (repeat (x end? (done) SELF_x next))\r\t\t(numch<\"bytec_bytec+1? \r\t\t  (SELF set to write (pagen+bytec/512) bytec mod 512))\r\t\tsadr[bytec]_x &*  255'\r\r\t%next? ((%word? (%_? (7)\r\t\t\t'\t\tfi next word_<integer> -- write integer.\r\t\t\tpossibly increment pointer to word boundary.\r\t\t\t(0=bytec &*  1? () \"bytec_bytec+1)\r\t\t\tSELF _ :x/256. SELF _ x mod 256.'\r\r\t\t\t 6)\r\t\t\t'\t\tfi next word -- read an integer\r\t\t\t(0=bytec &*  1? () \"bytec_bytec+1)\r\t\t\t!(SELF next*256) + SELF next'\r\r\t\t  %into? (16)\r\t\t\t'\t\tfi next into <string> -- read a string\r\t\t\tfor i to :x length(x[i]_SELF next).!x'\r\r\t\t  25) CODE 50)\r\t\t\t'\t\tfi next -- read a character\r\t\t\t(numch<\"bytec_bytec+1?\r\t\t\t (SELF set to read (pagen+bytec/512) \r\t\t\t   bytec mod 512? () !0))  !sadr[bytec]'\r\r\t%set? (%to. (%end?(13)\r\t\t\t'\t\tfi set to end -- set file pointer to end of file.\r\t\t\tSELF set to read 16383 0'\r\r\t\t %write?(5) \r\t\t\t'\t\tfi set to write <integer> <integer> -- set file\r\t\t\tpointer to :spage :schar. if current page is dirty,\r\t\t\tor \u000freset\u000f, \u000fset to end\u000f or page change\r\t\t\toccurs, flush current page. read pages until\r\t\t\tpagen=spage. allocate new pages after end if\r\t\t\tnecessary (-1 512 is treated as start of next\r\t\t\tpage, i.e. pagen+1 0). \"bytec_schar'\r\r\t\t%read. 4) CODE 50)\r\t\t\t'\t\tsame as \u000fwrite\u000f except stop at end'\r\r\t%skipnext? (18 CODE 50)\r\t\t'\tfi skipnext <integer> -- set character pointer relative to\r\t\tcurrent position. (useful for skipping rather than reading,\r\t\tor for reading and backing up, but \u000fend\u000f may not work if\r\t\t\u000fbytec\u000f points off the current page)  \"bytec_ bytec + :.'\r\r\t%end? (10 CODE 50)\r\t\t'\tfi end -- return false if end of file has not occurred.\r\t\tnextp=0? (bytec<numch?(!false))!false'\r\r\t%\u0013? (! :\"  eval)\r\r\t%flush? (12 CODE 50)\r\t\t'\tfi flush -- dirty=0? () write current page'\r\r\t%writeseq? (22 CODE 50)\r\t\t'\ttransfer words from memory to a file\r\t\t:adr. :count. for i_adr to adr+count - 1\r\t\t(SELF next word _ mem i)'\r\r\t%readseq? (21 CODE 50)\r\t\t'\t...from a file to memory...(mem i _ SELF next word)'\r\r\t%is? (ISIT eval)\r\r\t%remove? (dirinst forget SELF)\r\t\t'\tremove file from filesopen list of directory'\r\r\t%close? (dirinst \u0013 bitinst flush.\r\t\t SELF flush. SELF remove. !\"closed)\r\t\t'\tfi close or \"fi_fi close (if fi is global) -- flush bittable\r\t\tand current page, remove instance from filesopen list of\r\t\tdirectory'\r\r\t%shorten? (%to. %here? (SELF shorten pagen bytec) 14 CODE 50)\r\t\t'\tfi shorten to <integer> <integer> -- shorten a file SELF set\r\t\tto read :spage :schar. \"x_nextp. \"nextp_0.\r\t\t\"numch_schar. \"dirty_1. deallocate x and successors'\r\r\t%print? (disp _ fname)\r\t\t'\tfile prints its name'\r\r\t%reset? (11 CODE 50)\r\t\t'\tfi reset -- reposition to beginning of file\r\t\tSELF set 1 0'\r\r\t%intostring?(SELF set to end.\r  \t\t\"x _ string bytec + 512 * pagen - 1.\r    \t\tSELF reset.  !SELF next into x)\r\r\t%random? (SELF set to end. \"rvec _ vector pagen.\r\t\t  for x to rvec length (SELF set x 0. rvec[x] _ curadr))\r\t\t'\tfi random -- initialize a random access vector to be used\r\t\tin fi set...  new pages appended to the file will not be\r\t\trandomly accessed'\r\r\t%pages? (20 CODE 50)\r\t\t'\tfi pages <integer> ... <integer> -- out of the same great\r\t\ttradition as \u000fmem\u000f comes the power to do potentially\r\t\tcatastrophic direct disk i/o (not for the faint-hearted).\r\t\t :coreaddress. :diskaddress. :diskcommand. :startpage.\r\t\t:numberofpages. :coreincrement. if -1 =  coreaddress,\r\t\tcopy \u000fsadr\u000f to a buffer before the i/o call. diskaddress\r\t\t(=-1 yields \u000fcuradr\u000f) and diskcommand are the alto disk\r\t\taddress and command. startpage is relevant if label checking\r\t\tis performed. numberofpages is the number of disk pages\r\t\tto process. coreincrement is usually 0 (for writing in same\r\t\tbuffer) or 256 for using consecutive pages of core.  use\r\t\tlabel block from instance of \u000ffi\u000f. copy label block from\r\t\tinstance. perform i/o call. copy \u000fcuradr\u000f and label block\r\t\tinto instance. if -1=coreaddress copy buffer to \"sadr\".' \r\r\tisnew? (\"fname_ncheck :. fname is false?\r\t\t\t(error \"(bad file name) !nil) \r\t\t(null \"dirinst _ #curdir? \r\t\t\t(\"dirinst _ directory \u0013 defdir.  dirinst open)).\r\t\t\t'\t\tset directory instance for file. if curdir is nil\r\t\t\tbecause file was not called from the context of a \r\t\t\tdirectory instance, use the default directory'\r\r\t\t%exists? (24 CODE 50. !fname)\r\t\t\t'\t\treturn false if file name does not occur in the\r\t\t\tdirectory'\r\r\t\t%delete? (15 CODE 50. !\"deleted)\r\t\t\t'\t\tdelete a file (see intro)'\r\r\t\t\"sadr _ (%using? (:) string 512).\r\t\t\t'\t\tset up file string buffer'\r\r\t\t%rename? (\"x _ ncheck :. x is false?\r\t\t\t\t(error \"(bad new name)!nil)\r\t\t\t  file x exists? (error \"(name already in use))\r\t\t\t  2 CODE 50.  \"fname _ x.  23 CODE 50.\r\t\t\t  SELF set 0 12.  SELF _ fname length.\r\t\t\t  SELF _ fname.  SELF flush.  !fname)\r\t\t\t'\t\tcheck that the new name is not already in use.\r\t\t\tlookup the original file and change its name in its\r\t\t\tdirectory, and in its leader page'\r\r\t\t %load? (2 CODE 50. 8 CODE 50)\r\t\t\t'\t\tlookup an old file and load (overlay) a Swat\r\t\t\tmemory image; return via save.'\r\r\t\t(%old? (2)\r\t\t sadr[13] _ fname length.\r\t\t sadr[14 to 13 + fname length] _ fname.\r\t\t %new? (dirinst \u0013 filinst is file? (3) 19)\r\t\t 1) CODE 50.\r\t\t\t'\t\tfind an old file or add a new entry (with its\r\t\t\tname as a BCPL string in its leader page. special\r\t\t\thandling for new directories). machine code may\r\t\t\treturn false'\r\r\t\t%save? (SELF set to write 256 0.  SELF reset.\r\t\t\tdirinst close.  9 CODE 50)\r\r\t\t\t'\t\tallocate a file, close the directory (other files\r\t\t\te.g. DRIBBLE, and directories should be already\r\t\t\tclosed), and write out the memory image as a Swat\r\t\t\tfile.  when arriving here from a \u000fload\u000f, return false;\r\t\t\totherwise return the file instance.'\r\r\t\t%intostring?(!SELF intostring)\r\t\tdirinst remember SELF) ))\r\t\t\t'\t\tfinally, file puts itself into the filesopen list of its\r\t\t\tdirectory'\rfile \u0013(ev)\rto ncheck str i x :: legal (\"str_:.\r\t(str is string?(str length < 255?() !false) !false)\r\tfor i to str length\r\t\t(\"x _ str[i].\r\t\t96 < x < 123 ? ('lowercase')\r\t\t 47 < x <  58 ? ('digit')\r\t  \t   0 < legal[1 to 6] find x ? ('legal')\r\t\t64 < x < 91 ? ('uppercase')\r\t\t!false)\r\tx=46?(!str) !str+ \".chars)\r'check that the file name is a proper length string containing only lower/upper case letters, digits, or legal characters. if name does not end with a period, append one.'\r\rPUT ncheck \"legal fill string 6\r+-$!?.   \rdone\r\r\rto error adr ptr arec class :: c shocode find sub (\r\t%knows?(!ev)\r\t:ptr. \"arec_leech AREC.\r\tdisp sub \"((0=adr?(ptr print)\r\t\tmem 66_0. disp_255 &*  mem adr.\r\t\tfor adr_adr+1 to adr+(mem adr)&/ -9 (\r\t\t\t\"ptr_mem adr.\r\t\t\tdisp_ptr&/ -8. disp_ptr&*  255))\r\tcr c ev))  \rerror knows\rto c class code cpc (\r\tnull arec[5]?(.) \"arec_leech arec[5]. \"class_arec[0].\r\t(GET class \"TITLE) print. \": print.\r\tarec[6] is vector?(find arec[1]&   arec[6] ? (shocode))\r\tfind arec[1]&   GET class \"DO ? (shocode).\r\t)\rto shocode i (\r\tfor i_1 to code length\r\t\t(i<cpc - 5?(disp_46) i>cpc+5?(disp_46)\r\t\tsp. (i=cpc?(disp_25))\r\t\tcode[i] is vector?(\"$ print) code[i] print).\r\t)\rto find adr vec vadr l (\r\t'a tree search in vec for the address adr'\r\t\"adr_:. \"l_leech :vec.\r\tvec is vector is false?(!false)\r\t\"vadr_(leech l)[1]&   +1.\r\t(adr>vadr?(adr<vadr+vec length+1?\r\t\t(\"cpc _ adr-vadr. \"l_0. \"code_vec. !true)))\r\t\"l_0. for l to vec length\r\t\t(vec[l] is vector?(find adr vec[l]?(!true)))\r\t!false)\rto sub disp (\"disp _ GET USER \"disp. (:) eval)\rdone\r \rto kbck i (\"i _ 1. CODE 20)\r\t'Returns true if the keyboard has been hit.'\r\rto button n (!:n=mouse 7)\r\t'Returns true if that pattern is being held down'\r\r\r'THE SMALLTALK EDITOR ---'\r \r \rto edit func t (:#func. \r\t\"t_GET func \"DO. \r\tnull t ? (!\"(no code))\r\t%title? ((veced classprint func header) eval)\r\tPUT func \"DO veced t. \r\t!\"edited)  \r\t'Edit picks up a code vector, makes sure it is not empty and calls\r\tveced to edit the code body.  If you say edit foo title, veced will\r\tedit the header as well, and the changed form will be evalled upon\r\texit to redefine the function, title and all.\r\r\tVeced can be used on any vector, and is used by FIX as well as\r\tEDIT.  It creates two new windows within the default DISP which\r\texists when it is called.  One is used for a menu of commands,\r\tthe other becomes the new default window DISP. The new default\r\tis passed to an intermediary; and the newly edited vector is\r\treturned.'\r\r(to veced back newdisp  menu x ::  menuwidth menulen menustr\red edtarget gettwo bugin getvec  (\r\t%knows?(ev)\r\t\"back_false. \r\tdisp fclear.\r\tdisp\u0013 (\"menu_dispframe winx+winwd-menuwidth menuwidth\r\t\t\twiny (winht>139?(winht) 140) string 70\r\t\t\tfont font.\r\t\tmenu _ menustr.\r\t\t\"newdisp _ dispframe winx winwd-menuwidth+2\r\t\t\twiny winht string buf length \r\t\t\tfont font noframe)\r\t:x. \"x _ indisp newdisp (ed x). \r\tdisp show.\r\t!x)   )\r\r\rveced knows\r\r\"menuwidth _ 64.\r\"menustr_string 0.\r\"menulen _ 10.\rdo menulen (\"x_fill string 9.\r\t\"menustr_menustr+x[1 to x[1 to 9]find 13]).\r Add\r Insert\r Replace\r Delete\r Move\r Up\r Push\r Enter\r Leave\r Exit\r\rto indisp disp (:disp. ! \u0003 eval)\r\t'used to make DISP a new local.'\r\rto ed ptr l n nrun command temp i nv n1 fnth hfnth   (\r\t\"command _ 0.\r\t:ptr. \r\t\"fnth _ 18.\r\t\"hfnth _ fnth/2.\r\trepeat(\r\t\t\"l_ptr length.\r\t\tback?(done with ptr) \r\t\tmenu show. disp clear\r\t\t\"nv_0.\r\t\tfor n to l\r\t\t\t(ptr[n] is vector?(disp_36. sp\r\t\t\t\t\"nv_nv+1. \"n1_n)\r\t\t\tptr[n] print. disp_32) \r\t\tcr cr.\r\t\t\"command _ edcomp bugin menu menulen both.\r\r\t\t\"(  \r\t\t(\"ptr_vecmod ptr l+1 0 read) \r\t\t(\"ptr_vecmod ptr edcomp edtarget both 0 read) \r\t\t(gettwo.  \"ptr_vecmod ptr n nrun read)\r\t\t(gettwo. \"ptr_vecmod ptr n nrun vector 0)\r\t\t(gettwo. \"temp _ ptr[n to n+nrun - 1]\r\t\t\t\"i_edcomp edtarget both.\r\t\t\t\"ptr_vecmod ptr n nrun vector 0.\r\t\t\t(i>n ? (\"i_i-nrun))\r\t\t\t\"ptr_vecmod ptr i 0 temp)\r\t\t(getvec?(\"ptr_vecmod ptr n 1 ptr[n]) again) \r\t\t(gettwo. \"temp_vector 1. \r\t\t\ttemp[1]_ ptr[n to n+nrun - 1].\r\t\t\t\"ptr_vecmod ptr n nrun temp)\r\t\t(getvec?(ptr[n]_ed ptr[n]) again)\r\t\t(done with ptr)\t\r\t\t(\"back_true. done with ptr)\r\t\t\t) [command] eval.\r\t\t)\r\t)\r\t'The heart of ED is a vector, containing as its elements code\r\tvectors.  The giant vector is indexed to get the particular piece of\r\tprogram, and it is sent the message EVAL.  Note that the order of\r\tthe segments in ED1 should match the order of the atom names in\r\tMENUVEC.'\r\r\rto gettwo t1 n2 (\"n_edcomp edtarget top. \r                 \"n2_edcomp edtarget bot.\r\t\"nrun _ 1+n2-n.\r\tnrun<1?(\"n_n2. \"nrun_2-nrun))\r\rto bugin  someframe  max index(\r\t:someframe.\r\t\"max _ 1+:.\r\trepeat (button 0 ? (repeat (\r\t\t\tbutton 7 ?(disp sub \"(ev))\r\t\t\tbutton 0 ?()\r\t\t\tdone) \r\t\tdone) \r\t\t) \r        \"index_someframe mfindt mx my\r\t0<index[1]< max ?\r\t\t(!index)\r\t'returns token index, if within range, else'\r\tagain\r\t'causes an exit out of this command by restarting ed|s\r\trepeat'\r\t)\r\rto edtarget (! bugin disp l)\r \rto getvec (nv=1?(\"n_n1. !true)\r\t!ptr[\"n_edcomp edtarget both] is vector)\r\rto edcomp compvec y hth (:compvec.\r\t\"y_compvec[4].\r\t\"hth_(%both?(fnth)%top?(hfnth)\r\t\t%bot?(\"y_y+hfnth. hfnth))\r\r\tdcomp compvec[2] compvec[3] y hth\r\t!compvec[1]\r\t)\rdone\r\r'BOOTSTRAPPING REVISITED'\r\rto classprint fn a b i j k flags clsv clsm arecv arecm instv instm code (\r\t:#fn. \"code _ GET fn \"DO. null code?(\"(no code))\r\t\"a_leech #fn. \"b_vector 1. \"b_leech b.  \"clsm_\"arecm_\"instm_0.\r\t\"k_a[1]&  . \"clsv_vector k. \"arecv_vector k. \"instv_vector k.\r\t'Pull symbols out of class table'\r\tfor i_4 to 4+2*k by 2\r\t'k is no. dbl entries -1, here'\r\t\t(\"k_a[i]&  .\r\t\tk = -1?(again).  \"flags _ k&/ -14.\r\t\t'\t0=class, 2=arec, 3=inst'\r\t\tflags=0?(0=\"(DO TITLE ARSIZE) [1 to 3] find a[i]?\r\t\t\t(clsv[\"clsm_clsm+1] _ a[i]))\r\t\tb[2]&   _ k&*2047.  \"j_a[i+1]&  .\r\t\t(flags=2?(arecv[j - 6] _ b[2]. arecm<j - 6?(\"arecm_j - 6))\r\t\t\tinstv[j+1] _ b[2]. instm<j+1?(\"instm_j+1))\r\t\t)\r\r\t'Now make up input form.'\r\t\"a _ vector 6+arecm+instm+clsm.\r\ta[1] _ \"to. a[2] _ GET fn \"TITLE.\r\ta[3 to \"j_2+arecm] _ arecv.\r\t(0<instm+clsm? (a[\"j_j+1]_\":. a[j+1 to \"j_j+instm] _ instv.\r\t\t0<clsm? (a[\"j_j+1]_\":. a[j+1 to \"j_j+clsm] _ clsv)))\r\t%header?(a[j+1]_code. !a)\r\tfor i to j (a[i] print. disp_32)\r\tshowpretty?(pshow code 3) code print)\r \rto nshow showpretty (\"showpretty_true. showev  :\" )\r \rto showev shAtom shVal (:shAtom. cr.\r\t(shAtom is atom?\r\t\t(\"shVal _ shAtom eval.\r\t\t(null GET shVal \"DO?\r\t\t\t(\"\" print. shAtom print. \"_ print.\r\t\t\t(shVal is vector? (\"\" print)\r\t\t\t\tnull shVal?(\"nil print))\r\t\t\tshVal print. \". print)\r\t\tclassprint shVal))\r\tshAtom print)\r\tdisp_30.)\r\rto filout disp flist i showpretty (\"showpretty _ %pretty.\r\tdsoff (:disp is string? (\"disp_file disp? () error \"(file error)))\r\t(%add?(disp set to end))\r\t(null :flist?(defs map \"(showev vec[i]. cr))\r\t(flist is atom? (showev flist. \"flist_flist eval))\r\tfor i to flist length - 1 (showev flist[i]. cr)) \r\tdisp shorten to here. disp close. dson.)\r\t'Filout basically does a show in an environment where the display is\r\treplaced by a file. filout pretty <file> or <string = file name> add\r\t<vector> if \u000fpretty\u000f is used, the text representation is neater but\r\ttakes longer to generate. if \u000fadd\u000f is used, function definitions are\r\tappended to the file. if <vector> is not specified, \u000fdefs\u000f is\r\tused.'\r \rto filin fi :: ev (%\u0013?(! \u0003 eval)\r     dsoff. \r    (:fi is string?(\"fi _ file fi old?()\r\t\tdson !false))\r    repeat\r      (fi end?(done)\r       dsoff.\r       cr (read of fi) eval print.\r       dson).\r    fi close.\r   )\rfilin\u0013 (to ev (repeat(cr (read of fi) eval print)))\r\r\t'Filin basically does a read-eval-print loop, but gets its input from a\r\tfile instead of a dispframe.'\r\rto type f t ((:f is string?(\r\t\t\"f _ file f old?(f remove)\r\t\t!false))\r\t\"t_string 30.\r\trepeat(f end?(done) disp_f next into t))\r\rto t fool  :: fontname ('dispframe \u0013 (\"defont _  file fontname intostring).'\r\t\"disp_dispframe 16 480 514 184 string 520.\r\tdisp _ version. \"defs _ obset.\r\tto to toAtm (CODE 19 defs_toAtm. toAtm)\r\tto read str (%of?(:str. CODE 2) ! disp read)\r\tPUT USER \"DO \"(repeat (cr read eval print)). \"t_0.)\rPUT t \"fontname fill string 6\rST8.AL\r\"version_fill string 34\rWelcome to SMALLTALK [May 5]               \r\rto quit f s t : : r b   (dsoff.\r      (null :s?()\r       \"f _ file r.\r       \"t _ f intostring.\r       f reset.\r       f _ s.\r       f _ 13.\r       f _ t.\r       f close).\r    file b load)\rPUT quit \"r fill string 7\rREM.CM.\rPUT quit \"b fill string 5\rBOOT.\r\rto os s : : r b   (\"s _ :.\r    file b save?\r      (quit s + r))\rPUT os \"b fill string 9\rBREAK.SV.\rPUT os \"r fill string 17\r;RESUME BREAK.SV.\r\r\"fill _ nil\r\r'Then execute...\r\tt. USER\r...to install the ST dispframe and start the read-eval-print loop in ST.\rWhen restarting from errors, execute...\r\tdisp show. disp frame. USER\r'","submorphs":[],"scripts":[],"shape":{"__isSmartRef__":true,"id":43},"derivationIds":["4D40C5AE-618E-4328-901A-851EECA85E4B","0937C574-4E70-4478-A9F8-92949D37A4B7","A4CE036B-1EF0-43A3-AE42-0D3EEAB11591","02F0BEB5-3031-43A9-8800-6A4CBE4E9C51","D22729F0-75FB-4B92-A576-B36253A15827","A56F5FEC-1E47-4F8D-8408-9E69C26F9910"],"id":"157E0945-2E63-417C-B8A0-E9CAB7249A31","grabbingEnabled":false,"droppingEnabled":false,"halosEnabled":true,"_FontSize":12,"doNotSerialize":["whenOpenedInWorldCallbacks"],"_ShowGutter":false,"_TextMode":"text","_Theme":"chrome","_LineWrapping":true,"_ShowInvisibles":false,"_ShowPrintMargin":false,"_ShowIndents":true,"_ShowActiveLine":false,"_SoftTabs":true,"_AutocompletionEnabled":true,"_ShowWarnings":true,"_ShowErrors":true,"storedString":"3 + 4","eventHandler":{"__isSmartRef__":true,"id":44},"layout":{"__isSmartRef__":true,"id":45},"accessibleInInactiveWindow":true,"allowInput":true,"_isFocused":false,"showsHalos":false,"prevScroll":[0,414],"name":"BootstrapText","owner":{"__isSmartRef__":true,"id":41},"_Rotation":0,"_Scale":1,"hasRobertsKeys":true,"__serializedExpressions__":["_Position","distanceToDragEvent"],"__LivelyClassName__":"lively.morphic.CodeEditor","__SourceModuleName__":"Global.lively.ide.CodeEditor","_Position":"lively.pt(12.0,10.0)","distanceToDragEvent":"lively.pt(394.0,-11.0)"},"43":{"_BorderWidth":1,"__serializedExpressions__":["_Extent","_BorderColor","extent"],"__LivelyClassName__":"lively.morphic.CodeEditorShape","__SourceModuleName__":"Global.lively.ide.CodeEditor","_Extent":"lively.pt(591.0,224.0)","_BorderColor":"Color.rgb(95,94,95)","extent":"lively.pt(591.0,224.0)"},"44":{"morph":{"__isSmartRef__":true,"id":42},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"45":{"resizeWidth":true,"resizeHeight":true},"46":{"submorphs":[{"__isSmartRef__":true,"id":47}],"scripts":[],"shape":{"__isSmartRef__":true,"id":52},"eventHandler":{"__isSmartRef__":true,"id":53},"_ClipMode":"visible","derivationIds":["EC7EBB28-54AE-4244-80ED-3E13650F82B7","9FD2DCE2-B997-4536-B2A5-90D7DD92B3E6","0D8CC908-BD1C-4062-BB03-3FCEB910483D","6A775CC1-3A29-4CDE-B809-34D66C8344A5","9CFCF346-BD60-447B-A8B4-6C7283BFB37F","8C591B15-2FD2-4C3C-9E92-FD6C526BB906"],"id":"625FAF54-82FE-4C92-849F-E192A814EC36","grabbingEnabled":false,"droppingEnabled":false,"halosEnabled":true,"value":false,"toggle":false,"isActive":true,"label":{"__isSmartRef__":true,"id":47},"_PreviousBorderWidth":1,"isPressed":false,"showsHalos":false,"attributeConnections":[{"__isSmartRef__":true,"id":54}],"doNotSerialize":["$$fire"],"doNotCopyProperties":["$$fire"],"name":"RestartButton","partsBinMetaInfo":{"__isSmartRef__":true,"id":56},"pinSpecs":[{"__isSmartRef__":true,"id":64}],"owner":{"__isSmartRef__":true,"id":41},"_StyleClassNames":["Morph","Button"],"_Rotation":0,"_Scale":1,"__serializedExpressions__":["_Position","distanceToDragEvent"],"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":65},"__LivelyClassName__":"lively.morphic.Button","__SourceModuleName__":"Global.lively.morphic.Widgets","_Position":"lively.pt(27.0,247.0)","distanceToDragEvent":"lively.pt(74.0,7.0)"},"47":{"submorphs":[],"scripts":[],"shape":{"__isSmartRef__":true,"id":48},"_WhiteSpaceHandling":"pre-wrap","textChunks":[{"__isSmartRef__":true,"id":49}],"eventHandler":{"__isSmartRef__":true,"id":51},"_ClipMode":"hidden","derivationIds":["7884E73F-0D17-44B3-907F-44A5223F1F3D","444B63A6-D9E7-4AB2-AB57-4A9146C18BFF","08999E10-CCC3-4CAB-99BC-4EF500309EC4","1B3EC449-66ED-48CD-A011-F908BAF5C576","70EE218A-6189-427D-8BDA-ACF18712F396","B6A0C081-904D-460B-B640-A6A8F5C45F5C"],"id":"FA319F81-5806-412C-BD10-3A73DC186A10","grabbingEnabled":false,"droppingEnabled":false,"halosEnabled":true,"fixedWidth":true,"_WordBreak":"break-all","fixedHeight":true,"_InputAllowed":false,"_HandStyle":"default","allowInput":false,"_FontFamily":"Helvetica","_FontSize":10,"evalEnabled":false,"owner":{"__isSmartRef__":true,"id":46},"isLabel":true,"_Align":"center","eventsAreIgnored":true,"_TextStylingMode":true,"showsHalos":false,"eventsAreDisabled":true,"_PointerEvents":"none","__serializedExpressions__":["_TextColor"],"__LivelyClassName__":"lively.morphic.Text","__SourceModuleName__":"Global.lively.morphic.TextCore","_TextColor":"Color.rgb(0,0,0)"},"48":{"_BorderWidth":0,"_Fill":null,"__serializedExpressions__":["_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(86.0,20.0)","_Padding":"lively.rect(0,3,0,0)","_BorderColor":"Color.rgb(0,0,0)"},"49":{"style":{"__isSmartRef__":true,"id":50},"chunkOwner":{"__isSmartRef__":true,"id":47},"_id":"_2649","storedString":"Restart","__LivelyClassName__":"lively.morphic.TextChunk","__SourceModuleName__":"Global.lively.morphic.TextCore"},"50":{"__serializedExpressions__":["color"],"__LivelyClassName__":"lively.morphic.TextEmphasis","__SourceModuleName__":"Global.lively.morphic.TextCore","color":"Color.rgb(0,0,0)"},"51":{"morph":{"__isSmartRef__":true,"id":47},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"52":{"_BorderWidth":1,"_BorderRadius":5,"_AppearanceStylingMode":true,"_BorderStylingMode":true,"__serializedExpressions__":["_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(86.0,20.0)","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(189,190,192)"},"53":{"morph":{"__isSmartRef__":true,"id":46},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"54":{"sourceObj":{"__isSmartRef__":true,"id":46},"sourceAttrName":"fire","targetObj":{"__isSmartRef__":true,"id":46},"targetMethodName":"doAction","varMapping":{"__isSmartRef__":true,"id":55},"__LivelyClassName__":"AttributeConnection","__SourceModuleName__":"Global.lively.bindings.Core"},"55":{"source":{"__isSmartRef__":true,"id":46},"target":{"__isSmartRef__":true,"id":46}},"56":{"partName":"Button","requiredModules":["users.Dan.ST72"],"partsSpaceName":"PartsBin/Inputs","comment":"A simple button that calls a method #doAction when pressed.","changes":[{"__isSmartRef__":true,"id":57},{"__isSmartRef__":true,"id":58},{"__isSmartRef__":true,"id":59},{"__isSmartRef__":true,"id":60},{"__isSmartRef__":true,"id":61},{"__isSmartRef__":true,"id":62},{"__isSmartRef__":true,"id":63}],"migrationLevel":7,"__serializedExpressions__":["lastModifiedDate"],"__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo","__SourceModuleName__":"Global.lively.PartsBin","lastModifiedDate":"new Date(\"Tue Jul 23 2013 23:21:11 GMT-0700 (PDT)\")"},"57":{"author":null,"message":"no comment","id":"F8B70225-5143-4A51-ABB4-344B488B3811","__serializedExpressions__":["date"],"date":"new Date(\"Tue Dec 11 2012 13:15:42 GMT-0800 (PST)\")"},"58":{"author":"robertkrahn","message":"no comment","id":"9B8B6BE4-4519-4A6C-8F47-70DE61BBB0FB","__serializedExpressions__":["date"],"date":"new Date(\"Tue Dec 11 2012 13:53:16 GMT-0800 (PST)\")"},"59":{"author":"robertkrahn","message":"test","id":"ACA617B4-0416-4E3C-9F4D-171A40F44F0F","__serializedExpressions__":["date"],"date":"new Date(\"Tue Apr 30 2013 20:34:25 GMT-0700 (PDT)\")"},"60":{"author":"robertkrahn","message":"no comment","id":"811BDE87-D8DD-48BB-97B2-7A3C3F3FAE32","__serializedExpressions__":["date"],"date":"new Date(\"Tue Apr 30 2013 20:35:59 GMT-0700 (PDT)\")"},"61":{"author":"robertkrahn","message":"no comment","id":"BB2EA501-D9AF-414B-A035-E1487DA6F0FD","__serializedExpressions__":["date"],"date":"new Date(\"Tue Apr 30 2013 20:36:30 GMT-0700 (PDT)\")"},"62":{"author":"Dan","message":"no comment","id":"A594459F-DA9B-49DD-A105-547B3F613CC5","__serializedExpressions__":["date"],"date":"new Date(\"Mon Jun 17 2013 10:22:38 GMT-0700 (PDT)\")"},"63":{"author":"Dan","message":"no comment","id":"CFEC4071-14FF-4AEB-A399-197884CD18BF","__serializedExpressions__":["date"],"date":"new Date(\"Mon Jun 17 2013 10:24:50 GMT-0700 (PDT)\")"},"64":{"pinName":"fire","modality":"output","type":"Boolean","accessor":"fire","location":1.5},"65":{"doAction":{"__isSmartRef__":true,"id":66}},"66":{"varMapping":{"__isSmartRef__":true,"id":67},"source":"function doAction() {\n    this.owner.doRestart()\n}","funcProperties":{"__isSmartRef__":true,"id":68},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"67":{"this":{"__isSmartRef__":true,"id":46}},"68":{"user":"Dan","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Tue Jul 22 2014 08:48:32 GMT-0700 (PDT)\")"},"69":{"submorphs":[{"__isSmartRef__":true,"id":70}],"scripts":[],"shape":{"__isSmartRef__":true,"id":75},"eventHandler":{"__isSmartRef__":true,"id":76},"_ClipMode":"visible","derivationIds":["EC7EBB28-54AE-4244-80ED-3E13650F82B7","9FD2DCE2-B997-4536-B2A5-90D7DD92B3E6","0D8CC908-BD1C-4062-BB03-3FCEB910483D","6A775CC1-3A29-4CDE-B809-34D66C8344A5","F1DC19CF-0A29-47D0-A7CC-7B0B418E3C09","6C1C2812-7F9A-46DF-BE1C-6D6FD2B58921","3565C5FD-1199-4A73-BF6B-D0DA534313D4"],"id":"70BBA249-7E5F-4B1E-BD68-B698CC7D4524","grabbingEnabled":false,"droppingEnabled":false,"halosEnabled":true,"value":false,"toggle":false,"isActive":true,"label":{"__isSmartRef__":true,"id":70},"_PreviousBorderWidth":1,"isPressed":false,"showsHalos":false,"attributeConnections":[{"__isSmartRef__":true,"id":77}],"doNotSerialize":["$$fire"],"doNotCopyProperties":["$$fire"],"name":"StepButton","partsBinMetaInfo":{"__isSmartRef__":true,"id":79},"pinSpecs":[{"__isSmartRef__":true,"id":87}],"owner":{"__isSmartRef__":true,"id":41},"_StyleClassNames":["Morph","Button"],"_Rotation":0,"_Scale":1,"__serializedExpressions__":["_Position","distanceToDragEvent"],"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":88},"__LivelyClassName__":"lively.morphic.Button","__SourceModuleName__":"Global.lively.morphic.Widgets","_Position":"lively.pt(130.0,248.0)","distanceToDragEvent":"lively.pt(52.0,-11.0)"},"70":{"submorphs":[],"scripts":[],"shape":{"__isSmartRef__":true,"id":71},"_WhiteSpaceHandling":"pre-wrap","textChunks":[{"__isSmartRef__":true,"id":72}],"eventHandler":{"__isSmartRef__":true,"id":74},"_ClipMode":"hidden","derivationIds":["7884E73F-0D17-44B3-907F-44A5223F1F3D","444B63A6-D9E7-4AB2-AB57-4A9146C18BFF","08999E10-CCC3-4CAB-99BC-4EF500309EC4","1B3EC449-66ED-48CD-A011-F908BAF5C576","31D6D227-C857-4BE2-A97A-2D57BF914C65","6CBD9B51-95A0-449A-9C85-C5D99B5958E5","7C0BDEB3-F2BE-464B-A403-3A765AF538F6"],"id":"5C241E95-C169-48C2-BD94-8CC797AE8D40","grabbingEnabled":false,"droppingEnabled":false,"halosEnabled":true,"fixedWidth":true,"_WordBreak":"break-all","fixedHeight":true,"_InputAllowed":false,"_HandStyle":"default","allowInput":false,"_FontFamily":"Helvetica","_FontSize":10,"evalEnabled":false,"owner":{"__isSmartRef__":true,"id":69},"isLabel":true,"_Align":"center","eventsAreIgnored":true,"_TextStylingMode":true,"showsHalos":false,"eventsAreDisabled":true,"_PointerEvents":"none","__serializedExpressions__":["_TextColor"],"__LivelyClassName__":"lively.morphic.Text","__SourceModuleName__":"Global.lively.morphic.TextCore","_TextColor":"Color.rgb(0,0,0)"},"71":{"_BorderWidth":0,"_Fill":null,"__serializedExpressions__":["_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(75.0,20.0)","_Padding":"lively.rect(0,3,0,0)","_BorderColor":"Color.rgb(0,0,0)"},"72":{"style":{"__isSmartRef__":true,"id":73},"chunkOwner":{"__isSmartRef__":true,"id":70},"_id":"_2859","storedString":"Step","__LivelyClassName__":"lively.morphic.TextChunk","__SourceModuleName__":"Global.lively.morphic.TextCore"},"73":{"__serializedExpressions__":["color"],"__LivelyClassName__":"lively.morphic.TextEmphasis","__SourceModuleName__":"Global.lively.morphic.TextCore","color":"Color.rgb(0,0,0)"},"74":{"morph":{"__isSmartRef__":true,"id":70},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"75":{"_BorderWidth":1,"_BorderRadius":5,"_AppearanceStylingMode":true,"_BorderStylingMode":true,"__serializedExpressions__":["_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(75.0,20.0)","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(189,190,192)"},"76":{"morph":{"__isSmartRef__":true,"id":69},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"77":{"sourceObj":{"__isSmartRef__":true,"id":69},"sourceAttrName":"fire","targetObj":{"__isSmartRef__":true,"id":69},"targetMethodName":"doAction","varMapping":{"__isSmartRef__":true,"id":78},"__LivelyClassName__":"AttributeConnection","__SourceModuleName__":"Global.lively.bindings.Core"},"78":{"source":{"__isSmartRef__":true,"id":69},"target":{"__isSmartRef__":true,"id":69}},"79":{"partName":"Button","requiredModules":[],"partsSpaceName":"PartsBin/Inputs","comment":"A simple button that calls a method #doAction when pressed.","changes":[{"__isSmartRef__":true,"id":80},{"__isSmartRef__":true,"id":81},{"__isSmartRef__":true,"id":82},{"__isSmartRef__":true,"id":83},{"__isSmartRef__":true,"id":84},{"__isSmartRef__":true,"id":85},{"__isSmartRef__":true,"id":86}],"migrationLevel":7,"__serializedExpressions__":["lastModifiedDate"],"__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo","__SourceModuleName__":"Global.lively.PartsBin","lastModifiedDate":"new Date(\"Tue Jul 23 2013 23:21:11 GMT-0700 (PDT)\")"},"80":{"author":null,"message":"no comment","id":"F8B70225-5143-4A51-ABB4-344B488B3811","__serializedExpressions__":["date"],"date":"new Date(\"Tue Dec 11 2012 13:15:42 GMT-0800 (PST)\")"},"81":{"author":"robertkrahn","message":"no comment","id":"9B8B6BE4-4519-4A6C-8F47-70DE61BBB0FB","__serializedExpressions__":["date"],"date":"new Date(\"Tue Dec 11 2012 13:53:16 GMT-0800 (PST)\")"},"82":{"author":"robertkrahn","message":"test","id":"ACA617B4-0416-4E3C-9F4D-171A40F44F0F","__serializedExpressions__":["date"],"date":"new Date(\"Tue Apr 30 2013 20:34:25 GMT-0700 (PDT)\")"},"83":{"author":"robertkrahn","message":"no comment","id":"811BDE87-D8DD-48BB-97B2-7A3C3F3FAE32","__serializedExpressions__":["date"],"date":"new Date(\"Tue Apr 30 2013 20:35:59 GMT-0700 (PDT)\")"},"84":{"author":"robertkrahn","message":"no comment","id":"BB2EA501-D9AF-414B-A035-E1487DA6F0FD","__serializedExpressions__":["date"],"date":"new Date(\"Tue Apr 30 2013 20:36:30 GMT-0700 (PDT)\")"},"85":{"author":"Dan","message":"no comment","id":"A594459F-DA9B-49DD-A105-547B3F613CC5","__serializedExpressions__":["date"],"date":"new Date(\"Mon Jun 17 2013 10:22:38 GMT-0700 (PDT)\")"},"86":{"author":"Dan","message":"no comment","id":"CFEC4071-14FF-4AEB-A399-197884CD18BF","__serializedExpressions__":["date"],"date":"new Date(\"Mon Jun 17 2013 10:24:50 GMT-0700 (PDT)\")"},"87":{"pinName":"fire","modality":"output","type":"Boolean","accessor":"fire","location":1.5},"88":{"doAction":{"__isSmartRef__":true,"id":89}},"89":{"varMapping":{"__isSmartRef__":true,"id":90},"source":"function doAction() {\n    this.owner.doStep()\n}","funcProperties":{"__isSmartRef__":true,"id":91},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"90":{"this":{"__isSmartRef__":true,"id":69}},"91":{"user":"Dan","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Tue Jul 22 2014 08:49:12 GMT-0700 (PDT)\")"},"92":{"submorphs":[{"__isSmartRef__":true,"id":93}],"scripts":[],"shape":{"__isSmartRef__":true,"id":98},"eventHandler":{"__isSmartRef__":true,"id":99},"_ClipMode":"visible","derivationIds":["EC7EBB28-54AE-4244-80ED-3E13650F82B7","9FD2DCE2-B997-4536-B2A5-90D7DD92B3E6","0D8CC908-BD1C-4062-BB03-3FCEB910483D","6A775CC1-3A29-4CDE-B809-34D66C8344A5","F1DC19CF-0A29-47D0-A7CC-7B0B418E3C09","B5D276D2-3DF4-4221-864B-E6D1744DFB3A","547F5E12-3D18-4675-93F8-2F6ABF15F0BF","C5991231-EE90-4231-9DBD-C44D73F63E68"],"id":"D22272C4-76D9-42EE-8D6D-14CE32F045CE","grabbingEnabled":false,"droppingEnabled":false,"halosEnabled":true,"value":false,"toggle":false,"isActive":true,"label":{"__isSmartRef__":true,"id":93},"_PreviousBorderWidth":1,"isPressed":false,"showsHalos":false,"attributeConnections":[{"__isSmartRef__":true,"id":100}],"doNotSerialize":["$$fire"],"doNotCopyProperties":["$$fire"],"name":"RunButton","partsBinMetaInfo":{"__isSmartRef__":true,"id":102},"pinSpecs":[{"__isSmartRef__":true,"id":110}],"owner":{"__isSmartRef__":true,"id":41},"_StyleClassNames":["Morph","Button"],"_Rotation":0,"_Scale":1,"__serializedExpressions__":["_Position","distanceToDragEvent"],"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":111},"__LivelyClassName__":"lively.morphic.Button","__SourceModuleName__":"Global.lively.morphic.Widgets","_Position":"lively.pt(223.0,248.0)","distanceToDragEvent":"lively.pt(52.0,-8.0)"},"93":{"submorphs":[],"scripts":[],"shape":{"__isSmartRef__":true,"id":94},"_WhiteSpaceHandling":"pre-wrap","textChunks":[{"__isSmartRef__":true,"id":95}],"eventHandler":{"__isSmartRef__":true,"id":97},"_ClipMode":"hidden","derivationIds":["7884E73F-0D17-44B3-907F-44A5223F1F3D","444B63A6-D9E7-4AB2-AB57-4A9146C18BFF","08999E10-CCC3-4CAB-99BC-4EF500309EC4","1B3EC449-66ED-48CD-A011-F908BAF5C576","31D6D227-C857-4BE2-A97A-2D57BF914C65","08F7397F-DD31-429B-8EEE-D304037276DE","25479E9E-9DEE-41A1-90F7-FC1F7333A3CE","B06B954D-4725-42C6-8F3A-78A36E822370"],"id":"7304C285-2777-4177-88E7-0D0CAE8225A2","grabbingEnabled":false,"droppingEnabled":false,"halosEnabled":true,"fixedWidth":true,"_WordBreak":"break-all","fixedHeight":true,"_InputAllowed":false,"_HandStyle":"default","allowInput":false,"_FontFamily":"Helvetica","_FontSize":10,"evalEnabled":false,"owner":{"__isSmartRef__":true,"id":92},"isLabel":true,"_Align":"center","eventsAreIgnored":true,"_TextStylingMode":true,"showsHalos":false,"eventsAreDisabled":true,"_PointerEvents":"none","__serializedExpressions__":["_TextColor"],"__LivelyClassName__":"lively.morphic.Text","__SourceModuleName__":"Global.lively.morphic.TextCore","_TextColor":"Color.rgb(0,0,0)"},"94":{"_BorderWidth":0,"_Fill":null,"__serializedExpressions__":["_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(75.0,20.0)","_Padding":"lively.rect(0,3,0,0)","_BorderColor":"Color.rgb(0,0,0)"},"95":{"style":{"__isSmartRef__":true,"id":96},"chunkOwner":{"__isSmartRef__":true,"id":93},"_id":"_3059","storedString":"Run","__LivelyClassName__":"lively.morphic.TextChunk","__SourceModuleName__":"Global.lively.morphic.TextCore"},"96":{"__serializedExpressions__":["color"],"__LivelyClassName__":"lively.morphic.TextEmphasis","__SourceModuleName__":"Global.lively.morphic.TextCore","color":"Color.rgb(0,0,0)"},"97":{"morph":{"__isSmartRef__":true,"id":93},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"98":{"_BorderWidth":1,"_BorderRadius":5,"_AppearanceStylingMode":true,"_BorderStylingMode":true,"__serializedExpressions__":["_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(75.0,20.0)","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(189,190,192)"},"99":{"morph":{"__isSmartRef__":true,"id":92},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"100":{"sourceObj":{"__isSmartRef__":true,"id":92},"sourceAttrName":"fire","targetObj":{"__isSmartRef__":true,"id":92},"targetMethodName":"doAction","varMapping":{"__isSmartRef__":true,"id":101},"__LivelyClassName__":"AttributeConnection","__SourceModuleName__":"Global.lively.bindings.Core"},"101":{"source":{"__isSmartRef__":true,"id":92},"target":{"__isSmartRef__":true,"id":92}},"102":{"partName":"Button","requiredModules":[],"partsSpaceName":"PartsBin/Inputs","comment":"A simple button that calls a method #doAction when pressed.","changes":[{"__isSmartRef__":true,"id":103},{"__isSmartRef__":true,"id":104},{"__isSmartRef__":true,"id":105},{"__isSmartRef__":true,"id":106},{"__isSmartRef__":true,"id":107},{"__isSmartRef__":true,"id":108},{"__isSmartRef__":true,"id":109}],"migrationLevel":7,"__serializedExpressions__":["lastModifiedDate"],"__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo","__SourceModuleName__":"Global.lively.PartsBin","lastModifiedDate":"new Date(\"Tue Jul 23 2013 23:21:11 GMT-0700 (PDT)\")"},"103":{"author":null,"message":"no comment","id":"F8B70225-5143-4A51-ABB4-344B488B3811","__serializedExpressions__":["date"],"date":"new Date(\"Tue Dec 11 2012 13:15:42 GMT-0800 (PST)\")"},"104":{"author":"robertkrahn","message":"no comment","id":"9B8B6BE4-4519-4A6C-8F47-70DE61BBB0FB","__serializedExpressions__":["date"],"date":"new Date(\"Tue Dec 11 2012 13:53:16 GMT-0800 (PST)\")"},"105":{"author":"robertkrahn","message":"test","id":"ACA617B4-0416-4E3C-9F4D-171A40F44F0F","__serializedExpressions__":["date"],"date":"new Date(\"Tue Apr 30 2013 20:34:25 GMT-0700 (PDT)\")"},"106":{"author":"robertkrahn","message":"no comment","id":"811BDE87-D8DD-48BB-97B2-7A3C3F3FAE32","__serializedExpressions__":["date"],"date":"new Date(\"Tue Apr 30 2013 20:35:59 GMT-0700 (PDT)\")"},"107":{"author":"robertkrahn","message":"no comment","id":"BB2EA501-D9AF-414B-A035-E1487DA6F0FD","__serializedExpressions__":["date"],"date":"new Date(\"Tue Apr 30 2013 20:36:30 GMT-0700 (PDT)\")"},"108":{"author":"Dan","message":"no comment","id":"A594459F-DA9B-49DD-A105-547B3F613CC5","__serializedExpressions__":["date"],"date":"new Date(\"Mon Jun 17 2013 10:22:38 GMT-0700 (PDT)\")"},"109":{"author":"Dan","message":"no comment","id":"CFEC4071-14FF-4AEB-A399-197884CD18BF","__serializedExpressions__":["date"],"date":"new Date(\"Mon Jun 17 2013 10:24:50 GMT-0700 (PDT)\")"},"110":{"pinName":"fire","modality":"output","type":"Boolean","accessor":"fire","location":1.5},"111":{"doAction":{"__isSmartRef__":true,"id":112}},"112":{"varMapping":{"__isSmartRef__":true,"id":113},"source":"function doAction() {\n    this.owner.doRun()\n}","funcProperties":{"__isSmartRef__":true,"id":114},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"113":{"this":{"__isSmartRef__":true,"id":92}},"114":{"user":"Dan","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Tue Jul 22 2014 08:49:32 GMT-0700 (PDT)\")"},"115":{"storedTextString":"","submorphs":[],"scripts":[],"shape":{"__isSmartRef__":true,"id":116},"derivationIds":["4D40C5AE-618E-4328-901A-851EECA85E4B","0937C574-4E70-4478-A9F8-92949D37A4B7","A4CE036B-1EF0-43A3-AE42-0D3EEAB11591","02F0BEB5-3031-43A9-8800-6A4CBE4E9C51","7011D3B7-D02B-42BC-B3EB-301873E6EBDF","DCE1E0CE-2CBD-435A-B8BE-AF0952FA8655","A8D55420-47AD-44AD-9895-8EABF39CCCB1"],"id":"7FF5F2D5-AFE1-44BF-A0ED-70E8F464CFBD","grabbingEnabled":false,"droppingEnabled":false,"halosEnabled":true,"_FontSize":12,"doNotSerialize":["whenOpenedInWorldCallbacks"],"_ShowGutter":false,"_TextMode":"text","_Theme":"chrome","_LineWrapping":true,"_ShowInvisibles":false,"_ShowPrintMargin":false,"_ShowIndents":true,"_ShowActiveLine":false,"_SoftTabs":true,"_AutocompletionEnabled":true,"_ShowWarnings":true,"_ShowErrors":true,"storedString":"3 + 4","eventHandler":{"__isSmartRef__":true,"id":117},"layout":{"__isSmartRef__":true,"id":118},"accessibleInInactiveWindow":true,"allowInput":true,"_isFocused":false,"showsHalos":false,"prevScroll":[0,0],"name":"StackText","_Rotation":0,"_Scale":1,"owner":{"__isSmartRef__":true,"id":41},"hasRobertsKeys":true,"__serializedExpressions__":["_Position"],"__LivelyClassName__":"lively.morphic.CodeEditor","__SourceModuleName__":"Global.lively.ide.CodeEditor","_Position":"lively.pt(13.0,281.0)"},"116":{"_BorderWidth":1,"__serializedExpressions__":["_Extent","_BorderColor","extent"],"__LivelyClassName__":"lively.morphic.CodeEditorShape","__SourceModuleName__":"Global.lively.ide.CodeEditor","_Extent":"lively.pt(590.0,165.0)","_BorderColor":"Color.rgb(95,94,95)","extent":"lively.pt(590.0,165.0)"},"117":{"morph":{"__isSmartRef__":true,"id":115},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"118":{"resizeWidth":true,"resizeHeight":true},"119":{"submorphs":[{"__isSmartRef__":true,"id":120}],"scripts":[],"shape":{"__isSmartRef__":true,"id":125},"eventHandler":{"__isSmartRef__":true,"id":126},"_ClipMode":"visible","derivationIds":["EC7EBB28-54AE-4244-80ED-3E13650F82B7","9FD2DCE2-B997-4536-B2A5-90D7DD92B3E6","0D8CC908-BD1C-4062-BB03-3FCEB910483D","6A775CC1-3A29-4CDE-B809-34D66C8344A5","F1DC19CF-0A29-47D0-A7CC-7B0B418E3C09","B5D276D2-3DF4-4221-864B-E6D1744DFB3A","E95D3605-3E40-486F-9D4E-4443D37D690F","6C695DF9-CBEF-4D5E-B201-D5C5696248D1","56FDED61-FB0D-485B-8359-E1BF6A6DDDD1"],"id":"DA69975E-2AF8-4E00-8D28-BFE88D58CA13","grabbingEnabled":false,"droppingEnabled":false,"halosEnabled":true,"value":false,"toggle":false,"isActive":true,"label":{"__isSmartRef__":true,"id":120},"_PreviousBorderWidth":1,"isPressed":false,"showsHalos":false,"attributeConnections":[{"__isSmartRef__":true,"id":127}],"doNotSerialize":["$$fire"],"doNotCopyProperties":["$$fire"],"name":"RunToButton","partsBinMetaInfo":{"__isSmartRef__":true,"id":129},"pinSpecs":[{"__isSmartRef__":true,"id":137}],"_StyleClassNames":["Morph","Button"],"owner":{"__isSmartRef__":true,"id":41},"_Rotation":0,"_Scale":1,"__serializedExpressions__":["_Position","distanceToDragEvent"],"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":138},"__LivelyClassName__":"lively.morphic.Button","__SourceModuleName__":"Global.lively.morphic.Widgets","_Position":"lively.pt(315.0,248.0)","distanceToDragEvent":"lively.pt(64.0,-9.0)"},"120":{"submorphs":[],"scripts":[],"shape":{"__isSmartRef__":true,"id":121},"_WhiteSpaceHandling":"pre-wrap","textChunks":[{"__isSmartRef__":true,"id":122}],"eventHandler":{"__isSmartRef__":true,"id":124},"_ClipMode":"hidden","derivationIds":["7884E73F-0D17-44B3-907F-44A5223F1F3D","444B63A6-D9E7-4AB2-AB57-4A9146C18BFF","08999E10-CCC3-4CAB-99BC-4EF500309EC4","1B3EC449-66ED-48CD-A011-F908BAF5C576","31D6D227-C857-4BE2-A97A-2D57BF914C65","08F7397F-DD31-429B-8EEE-D304037276DE","24B87A65-8747-421C-80B0-E2A42197E2B4","7A1C6ACC-1EE6-4348-AE53-5922669E6E40","33B0CAA7-1008-45C5-BC6C-FEDFA956A884"],"id":"D42D8512-660C-4E98-9A7F-7D714B653DB5","grabbingEnabled":false,"droppingEnabled":false,"halosEnabled":true,"fixedWidth":true,"_WordBreak":"break-all","fixedHeight":true,"_InputAllowed":false,"_HandStyle":"default","allowInput":false,"_FontFamily":"Helvetica","_FontSize":10,"evalEnabled":false,"owner":{"__isSmartRef__":true,"id":119},"isLabel":true,"_Align":"center","eventsAreIgnored":true,"_TextStylingMode":true,"showsHalos":false,"eventsAreDisabled":true,"_PointerEvents":"none","__serializedExpressions__":["_TextColor"],"__LivelyClassName__":"lively.morphic.Text","__SourceModuleName__":"Global.lively.morphic.TextCore","_TextColor":"Color.rgb(0,0,0)"},"121":{"_BorderWidth":0,"_Fill":null,"__serializedExpressions__":["_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(87.0,20.0)","_Padding":"lively.rect(0,3,0,0)","_BorderColor":"Color.rgb(0,0,0)"},"122":{"style":{"__isSmartRef__":true,"id":123},"chunkOwner":{"__isSmartRef__":true,"id":120},"_id":"_271","storedString":"Run to 877","__LivelyClassName__":"lively.morphic.TextChunk","__SourceModuleName__":"Global.lively.morphic.TextCore"},"123":{"__serializedExpressions__":["color"],"__LivelyClassName__":"lively.morphic.TextEmphasis","__SourceModuleName__":"Global.lively.morphic.TextCore","color":"Color.rgb(0,0,0)"},"124":{"morph":{"__isSmartRef__":true,"id":120},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"125":{"_BorderWidth":1,"_BorderRadius":5,"_AppearanceStylingMode":true,"_BorderStylingMode":true,"__serializedExpressions__":["_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(87.0,20.0)","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(189,190,192)"},"126":{"morph":{"__isSmartRef__":true,"id":119},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"127":{"sourceObj":{"__isSmartRef__":true,"id":119},"sourceAttrName":"fire","targetObj":{"__isSmartRef__":true,"id":119},"targetMethodName":"doAction","varMapping":{"__isSmartRef__":true,"id":128},"__LivelyClassName__":"AttributeConnection","__SourceModuleName__":"Global.lively.bindings.Core"},"128":{"source":{"__isSmartRef__":true,"id":119},"target":{"__isSmartRef__":true,"id":119}},"129":{"partName":"Button","requiredModules":[],"partsSpaceName":"PartsBin/Inputs","comment":"A simple button that calls a method #doAction when pressed.","changes":[{"__isSmartRef__":true,"id":130},{"__isSmartRef__":true,"id":131},{"__isSmartRef__":true,"id":132},{"__isSmartRef__":true,"id":133},{"__isSmartRef__":true,"id":134},{"__isSmartRef__":true,"id":135},{"__isSmartRef__":true,"id":136}],"migrationLevel":7,"__serializedExpressions__":["lastModifiedDate"],"__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo","__SourceModuleName__":"Global.lively.PartsBin","lastModifiedDate":"new Date(\"Tue Jul 23 2013 23:21:11 GMT-0700 (PDT)\")"},"130":{"author":null,"message":"no comment","id":"F8B70225-5143-4A51-ABB4-344B488B3811","__serializedExpressions__":["date"],"date":"new Date(\"Tue Dec 11 2012 13:15:42 GMT-0800 (PST)\")"},"131":{"author":"robertkrahn","message":"no comment","id":"9B8B6BE4-4519-4A6C-8F47-70DE61BBB0FB","__serializedExpressions__":["date"],"date":"new Date(\"Tue Dec 11 2012 13:53:16 GMT-0800 (PST)\")"},"132":{"author":"robertkrahn","message":"test","id":"ACA617B4-0416-4E3C-9F4D-171A40F44F0F","__serializedExpressions__":["date"],"date":"new Date(\"Tue Apr 30 2013 20:34:25 GMT-0700 (PDT)\")"},"133":{"author":"robertkrahn","message":"no comment","id":"811BDE87-D8DD-48BB-97B2-7A3C3F3FAE32","__serializedExpressions__":["date"],"date":"new Date(\"Tue Apr 30 2013 20:35:59 GMT-0700 (PDT)\")"},"134":{"author":"robertkrahn","message":"no comment","id":"BB2EA501-D9AF-414B-A035-E1487DA6F0FD","__serializedExpressions__":["date"],"date":"new Date(\"Tue Apr 30 2013 20:36:30 GMT-0700 (PDT)\")"},"135":{"author":"Dan","message":"no comment","id":"A594459F-DA9B-49DD-A105-547B3F613CC5","__serializedExpressions__":["date"],"date":"new Date(\"Mon Jun 17 2013 10:22:38 GMT-0700 (PDT)\")"},"136":{"author":"Dan","message":"no comment","id":"CFEC4071-14FF-4AEB-A399-197884CD18BF","__serializedExpressions__":["date"],"date":"new Date(\"Mon Jun 17 2013 10:24:50 GMT-0700 (PDT)\")"},"137":{"pinName":"fire","modality":"output","type":"Boolean","accessor":"fire","location":1.5},"138":{"doAction":{"__isSmartRef__":true,"id":139}},"139":{"varMapping":{"__isSmartRef__":true,"id":140},"source":"function doAction() {\n    this.owner.doRunTo()\n}","funcProperties":{"__isSmartRef__":true,"id":141},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"140":{"this":{"__isSmartRef__":true,"id":119}},"141":{"user":"Dan","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Mon Jul 28 2014 12:39:45 GMT-0700 (PDT)\")"},"142":{"storedTextString":"","submorphs":[],"scripts":[],"shape":{"__isSmartRef__":true,"id":143},"derivationIds":["4D40C5AE-618E-4328-901A-851EECA85E4B","0937C574-4E70-4478-A9F8-92949D37A4B7","A4CE036B-1EF0-43A3-AE42-0D3EEAB11591","02F0BEB5-3031-43A9-8800-6A4CBE4E9C51","7011D3B7-D02B-42BC-B3EB-301873E6EBDF","582938AE-9F7C-492D-AE78-77B71A78E2DB","BFD2CE5E-4420-4F3A-B4DF-D5804ACBB573","BF3601A7-5B0B-48AD-BFD6-2A1690AA74FC"],"id":"31C8501E-8D55-4179-99F3-D6115D3386D5","grabbingEnabled":false,"droppingEnabled":false,"halosEnabled":true,"_FontSize":12,"doNotSerialize":["whenOpenedInWorldCallbacks"],"_ShowGutter":false,"_TextMode":"text","_Theme":"chrome","_LineWrapping":true,"_ShowInvisibles":false,"_ShowPrintMargin":false,"_ShowIndents":true,"_ShowActiveLine":false,"_SoftTabs":true,"_AutocompletionEnabled":true,"_ShowWarnings":true,"_ShowErrors":true,"storedString":"3 + 4","eventHandler":{"__isSmartRef__":true,"id":144},"layout":{"__isSmartRef__":true,"id":145},"accessibleInInactiveWindow":true,"allowInput":true,"_isFocused":false,"showsHalos":false,"prevScroll":[0,0],"name":"StepCountText","_Rotation":0,"_Scale":1,"owner":{"__isSmartRef__":true,"id":41},"hasRobertsKeys":true,"__serializedExpressions__":["_Position","distanceToDragEvent"],"__LivelyClassName__":"lively.morphic.CodeEditor","__SourceModuleName__":"Global.lively.ide.CodeEditor","_Position":"lively.pt(420.0,248.0)","distanceToDragEvent":"lively.pt(44.0,-14.0)"},"143":{"_BorderWidth":1,"__serializedExpressions__":["_Extent","_BorderColor","extent"],"__LivelyClassName__":"lively.morphic.CodeEditorShape","__SourceModuleName__":"Global.lively.ide.CodeEditor","_Extent":"lively.pt(65.0,19.0)","_BorderColor":"Color.rgb(95,94,95)","extent":"lively.pt(65.0,19.0)"},"144":{"morph":{"__isSmartRef__":true,"id":142},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"145":{"resizeWidth":true,"resizeHeight":true},"146":{"submorphs":[{"__isSmartRef__":true,"id":147}],"scripts":[],"shape":{"__isSmartRef__":true,"id":152},"eventHandler":{"__isSmartRef__":true,"id":153},"_ClipMode":"visible","derivationIds":["EC7EBB28-54AE-4244-80ED-3E13650F82B7","9FD2DCE2-B997-4536-B2A5-90D7DD92B3E6","0D8CC908-BD1C-4062-BB03-3FCEB910483D","6A775CC1-3A29-4CDE-B809-34D66C8344A5","F1DC19CF-0A29-47D0-A7CC-7B0B418E3C09","B5D276D2-3DF4-4221-864B-E6D1744DFB3A","E7690D00-4BCA-4DCF-90FA-D6F55B03DD41","146D917F-9945-4576-8F5A-2ED2DC82822B","D3F5AAB7-E591-4971-B6FB-D4C837CD5B82"],"id":"C07C176E-A4DF-4A15-9EE6-B71A9E57EBE2","grabbingEnabled":false,"droppingEnabled":false,"halosEnabled":true,"value":false,"toggle":false,"isActive":true,"label":{"__isSmartRef__":true,"id":147},"_PreviousBorderWidth":1,"isPressed":false,"showsHalos":false,"attributeConnections":[{"__isSmartRef__":true,"id":154}],"doNotSerialize":["$$fire"],"doNotCopyProperties":["$$fire"],"name":"RunButton1","partsBinMetaInfo":{"__isSmartRef__":true,"id":156},"pinSpecs":[{"__isSmartRef__":true,"id":164}],"_StyleClassNames":["Morph","Button"],"owner":{"__isSmartRef__":true,"id":41},"_Rotation":0,"_Scale":1,"__serializedExpressions__":["_Position","distanceToDragEvent"],"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":165},"__LivelyClassName__":"lively.morphic.Button","__SourceModuleName__":"Global.lively.morphic.Widgets","_Position":"lively.pt(504.0,247.0)","distanceToDragEvent":"lively.pt(52.0,-8.0)"},"147":{"submorphs":[],"scripts":[],"shape":{"__isSmartRef__":true,"id":148},"_WhiteSpaceHandling":"pre-wrap","textChunks":[{"__isSmartRef__":true,"id":149}],"eventHandler":{"__isSmartRef__":true,"id":151},"_ClipMode":"hidden","derivationIds":["7884E73F-0D17-44B3-907F-44A5223F1F3D","444B63A6-D9E7-4AB2-AB57-4A9146C18BFF","08999E10-CCC3-4CAB-99BC-4EF500309EC4","1B3EC449-66ED-48CD-A011-F908BAF5C576","31D6D227-C857-4BE2-A97A-2D57BF914C65","08F7397F-DD31-429B-8EEE-D304037276DE","BFF5CD19-A46E-4F4C-96AB-E50AF2F70D42","40FC8688-7D0A-4C06-BE69-28190478F387","75BC1473-8299-4FFD-8776-0FA60C575A78"],"id":"2252A9EB-5F52-4B8B-8D8B-8F5982B4BF93","grabbingEnabled":false,"droppingEnabled":false,"halosEnabled":true,"fixedWidth":true,"_WordBreak":"break-all","fixedHeight":true,"_InputAllowed":false,"_HandStyle":"default","allowInput":false,"_FontFamily":"Helvetica","_FontSize":10,"evalEnabled":false,"owner":{"__isSmartRef__":true,"id":146},"isLabel":true,"_Align":"center","eventsAreIgnored":true,"_TextStylingMode":true,"showsHalos":false,"eventsAreDisabled":true,"_PointerEvents":"none","__serializedExpressions__":["_TextColor"],"__LivelyClassName__":"lively.morphic.Text","__SourceModuleName__":"Global.lively.morphic.TextCore","_TextColor":"Color.rgb(0,0,0)"},"148":{"_BorderWidth":0,"_Fill":null,"__serializedExpressions__":["_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(75.0,20.0)","_Padding":"lively.rect(0,3,0,0)","_BorderColor":"Color.rgb(0,0,0)"},"149":{"style":{"__isSmartRef__":true,"id":150},"chunkOwner":{"__isSmartRef__":true,"id":147},"_id":"_2900","storedString":"Inspect","__LivelyClassName__":"lively.morphic.TextChunk","__SourceModuleName__":"Global.lively.morphic.TextCore"},"150":{"__serializedExpressions__":["color"],"__LivelyClassName__":"lively.morphic.TextEmphasis","__SourceModuleName__":"Global.lively.morphic.TextCore","color":"Color.rgb(0,0,0)"},"151":{"morph":{"__isSmartRef__":true,"id":147},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"152":{"_BorderWidth":1,"_BorderRadius":5,"_AppearanceStylingMode":true,"_BorderStylingMode":true,"__serializedExpressions__":["_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(75.0,20.0)","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(189,190,192)"},"153":{"morph":{"__isSmartRef__":true,"id":146},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"154":{"sourceObj":{"__isSmartRef__":true,"id":146},"sourceAttrName":"fire","targetObj":{"__isSmartRef__":true,"id":146},"targetMethodName":"doAction","varMapping":{"__isSmartRef__":true,"id":155},"__LivelyClassName__":"AttributeConnection","__SourceModuleName__":"Global.lively.bindings.Core"},"155":{"source":{"__isSmartRef__":true,"id":146},"target":{"__isSmartRef__":true,"id":146}},"156":{"partName":"Button","requiredModules":[],"partsSpaceName":"PartsBin/Inputs","comment":"A simple button that calls a method #doAction when pressed.","changes":[{"__isSmartRef__":true,"id":157},{"__isSmartRef__":true,"id":158},{"__isSmartRef__":true,"id":159},{"__isSmartRef__":true,"id":160},{"__isSmartRef__":true,"id":161},{"__isSmartRef__":true,"id":162},{"__isSmartRef__":true,"id":163}],"migrationLevel":7,"__serializedExpressions__":["lastModifiedDate"],"__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo","__SourceModuleName__":"Global.lively.PartsBin","lastModifiedDate":"new Date(\"Tue Jul 23 2013 23:21:11 GMT-0700 (PDT)\")"},"157":{"author":null,"message":"no comment","id":"F8B70225-5143-4A51-ABB4-344B488B3811","__serializedExpressions__":["date"],"date":"new Date(\"Tue Dec 11 2012 13:15:42 GMT-0800 (PST)\")"},"158":{"author":"robertkrahn","message":"no comment","id":"9B8B6BE4-4519-4A6C-8F47-70DE61BBB0FB","__serializedExpressions__":["date"],"date":"new Date(\"Tue Dec 11 2012 13:53:16 GMT-0800 (PST)\")"},"159":{"author":"robertkrahn","message":"test","id":"ACA617B4-0416-4E3C-9F4D-171A40F44F0F","__serializedExpressions__":["date"],"date":"new Date(\"Tue Apr 30 2013 20:34:25 GMT-0700 (PDT)\")"},"160":{"author":"robertkrahn","message":"no comment","id":"811BDE87-D8DD-48BB-97B2-7A3C3F3FAE32","__serializedExpressions__":["date"],"date":"new Date(\"Tue Apr 30 2013 20:35:59 GMT-0700 (PDT)\")"},"161":{"author":"robertkrahn","message":"no comment","id":"BB2EA501-D9AF-414B-A035-E1487DA6F0FD","__serializedExpressions__":["date"],"date":"new Date(\"Tue Apr 30 2013 20:36:30 GMT-0700 (PDT)\")"},"162":{"author":"Dan","message":"no comment","id":"A594459F-DA9B-49DD-A105-547B3F613CC5","__serializedExpressions__":["date"],"date":"new Date(\"Mon Jun 17 2013 10:22:38 GMT-0700 (PDT)\")"},"163":{"author":"Dan","message":"no comment","id":"CFEC4071-14FF-4AEB-A399-197884CD18BF","__serializedExpressions__":["date"],"date":"new Date(\"Mon Jun 17 2013 10:24:50 GMT-0700 (PDT)\")"},"164":{"pinName":"fire","modality":"output","type":"Boolean","accessor":"fire","location":1.5},"165":{"doAction":{"__isSmartRef__":true,"id":166}},"166":{"varMapping":{"__isSmartRef__":true,"id":167},"source":"function doAction() {\n    $world.openInspectorFor(this.owner.activeContext)\n}","funcProperties":{"__isSmartRef__":true,"id":168},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"167":{"this":{"__isSmartRef__":true,"id":146}},"168":{"user":"Dan","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Fri Jul 25 2014 13:25:45 GMT-0700 (PDT)\")"},"169":{"storedTextString":"","submorphs":[],"scripts":[],"shape":{"__isSmartRef__":true,"id":170},"derivationIds":["4D40C5AE-618E-4328-901A-851EECA85E4B","0937C574-4E70-4478-A9F8-92949D37A4B7","A4CE036B-1EF0-43A3-AE42-0D3EEAB11591","02F0BEB5-3031-43A9-8800-6A4CBE4E9C51","7011D3B7-D02B-42BC-B3EB-301873E6EBDF","DCE1E0CE-2CBD-435A-B8BE-AF0952FA8655","E2118351-F754-4830-A8A2-839D55C9956C","0E894667-6B5F-4293-B450-BBA0E0910967"],"id":"D58DE5D8-AFE1-4F5A-8365-BBFFE1548C69","grabbingEnabled":false,"droppingEnabled":false,"halosEnabled":true,"_FontSize":12,"doNotSerialize":["whenOpenedInWorldCallbacks"],"_ShowGutter":false,"_TextMode":"text","_Theme":"chrome","_LineWrapping":true,"_ShowInvisibles":false,"_ShowPrintMargin":false,"_ShowIndents":true,"_ShowActiveLine":false,"_SoftTabs":true,"_AutocompletionEnabled":true,"_ShowWarnings":true,"_ShowErrors":true,"storedString":"3 + 4","eventHandler":{"__isSmartRef__":true,"id":171},"layout":{"__isSmartRef__":true,"id":172},"accessibleInInactiveWindow":true,"allowInput":true,"_isFocused":false,"showsHalos":false,"prevScroll":[0,234.81817054748535],"name":"Transcript","_Rotation":0,"_Scale":1,"owner":{"__isSmartRef__":true,"id":41},"hasRobertsKeys":true,"__serializedExpressions__":["_Position"],"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":173},"__LivelyClassName__":"lively.morphic.CodeEditor","__SourceModuleName__":"Global.lively.ide.CodeEditor","_Position":"lively.pt(13.0,456.0)"},"170":{"_BorderWidth":1,"__serializedExpressions__":["_Extent","_BorderColor","extent"],"__LivelyClassName__":"lively.morphic.CodeEditorShape","__SourceModuleName__":"Global.lively.ide.CodeEditor","_Extent":"lively.pt(590.0,168.0)","_BorderColor":"Color.rgb(95,94,95)","extent":"lively.pt(590.0,168.0)"},"171":{"morph":{"__isSmartRef__":true,"id":169},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"172":{"resizeWidth":true,"resizeHeight":true},"173":{"show":{"__isSmartRef__":true,"id":174},"crShow":{"__isSmartRef__":true,"id":204}},"174":{"varMapping":{"__isSmartRef__":true,"id":175},"source":"function show(str) {\n    this.setTextString(this.getTextString() + str);\n}","funcProperties":{"__isSmartRef__":true,"id":203},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"175":{"this":{"__isSmartRef__":true,"id":169},"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":176}},"176":{"$super":{"__isSmartRef__":true,"id":177}},"177":{"varMapping":{"__isSmartRef__":true,"id":178},"source":"function () {\n    try {\n        return Object.getPrototypeOf(obj)[name].apply(obj, arguments);\n    } catch (e) {\n        if ($world)\n            $world.logError(e, 'Error in $super call');\n        else\n            alert('Error in $super call: ' + e + '\\n' + e.stack);\n        return null;\n    }\n}","funcProperties":{"__isSmartRef__":true,"id":179},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"178":{"obj":{"__isSmartRef__":true,"id":169},"name":"show"},"179":{"__serializedExpressions__":["_cachedScopeObject.2.2"],"_cachedScopeObject":[{"__isSmartRef__":true,"id":180},{"__isSmartRef__":true,"id":195},[{"__isSmartRef__":true,"id":196},{"__isSmartRef__":true,"id":202},"lively.module(\"Global\")"]],"livelyDebuggingEnabled":true},"180":{"1017":"show","1033":{"__isSmartRef__":true,"id":169},"1034":{"__isSmartRef__":true,"id":181},"1035":{"__isSmartRef__":true,"id":181},"1040":{"__isSmartRef__":true,"id":175},"1118":{"__isSmartRef__":true,"id":178},"1119":{"__isSmartRef__":true,"id":177},"1130":{"__isSmartRef__":true,"id":175},"1135":"show","__serializedLivelyClosures__":{"__isSmartRef__":true,"id":194}},"181":{"storedTextString":"","style":{"__isSmartRef__":true,"id":182},"doNotSerialize":["_aceInitialized","aceEditor","aceEditorAfterSetupCallbacks","savedTextString"],"evalEnabled":false,"isAceEditor":true,"isCodeEditor":true,"isText":true,"showsMorphMenu":true,"connections":{"__isSmartRef__":true,"id":183},"printInspectMaxDepth":1,"storedString":"","buildSpecProperties":{"__isSmartRef__":true,"id":187},"__LivelyClassName__":"lively.morphic.CodeEditor","__SourceModuleName__":"Global.lively.ide.CodeEditor"},"182":{"enableGrabbing":false,"enableDropping":false,"fontSize":12,"gutter":true,"textMode":"javascript","theme":"chrome","lineWrapping":true,"invisibles":false,"printMargin":false,"showActiveLine":false,"showIndents":true,"softTabs":true,"tabSize":4,"autocompletion":true,"showWarnings":true,"showErrors":true},"183":{"textChange":{"__isSmartRef__":true,"id":184},"textString":{"__isSmartRef__":true,"id":185},"savedTextString":{"__isSmartRef__":true,"id":186}},"184":{},"185":{},"186":{},"187":{"textString":{"__isSmartRef__":true,"id":188},"theme":{"__isSmartRef__":true,"id":189},"textMode":{"__isSmartRef__":true,"id":190},"_isFocused":{"__isSmartRef__":true,"id":191},"savedTextString":{"__isSmartRef__":true,"id":192},"aceEditor":{"__isSmartRef__":true,"id":193}},"188":{"defaultValue":""},"189":{"defaultValue":"chrome"},"190":{"defaultValue":"text"},"191":{"exclude":true},"192":{"exclude":true},"193":{"exclude":true},"194":{"1122":{"__isSmartRef__":true,"id":177},"1123":{"__isSmartRef__":true,"id":177},"1131":{"__isSmartRef__":true,"id":174},"1136":{"__isSmartRef__":true,"id":174}},"195":{"obj":{"__isSmartRef__":true,"id":169},"name":"show","proto":{"__isSmartRef__":true,"id":181},"mapping":{"__isSmartRef__":true,"id":175}},"196":{"1308":{"__isSmartRef__":true,"id":197},"1330":{"__isSmartRef__":true,"id":198},"2646":{"__isSmartRef__":true,"id":199}},"197":{},"198":{},"199":{"_debouncedByName":{"__isSmartRef__":true,"id":200},"_throttledByName":{"__isSmartRef__":true,"id":201}},"200":{},"201":{},"202":{},"203":{"user":"Dan","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Sat Aug 02 2014 08:33:34 GMT-0700 (PDT)\")"},"204":{"varMapping":{"__isSmartRef__":true,"id":205},"source":"function crShow(str) {\n    this.show(\"\\n\" + str);\n}","funcProperties":{"__isSmartRef__":true,"id":206},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"205":{"this":{"__isSmartRef__":true,"id":169}},"206":{"user":"Dan","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Wed Jul 30 2014 23:16:29 GMT-0700 (PDT)\")"},"207":{"_BorderWidth":1,"_ClipMode":"visible","_BorderRadius":0,"_Opacity":1,"_BorderStyle":"solid","__serializedExpressions__":["position","_Extent","_BorderColor","_Fill","_Padding"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(616.0,632.0)","_BorderColor":"Color.rgb(95,94,95)","_Fill":"Color.rgb(247,216,107)","_Padding":"lively.rect(0,0,0,0)"},"208":{"partsSpaceName":"PartsBin/Dan","comment":"A cleaned up UI for ST72 redux","migrationLevel":8,"partName":"VMPanel3","changes":[{"__isSmartRef__":true,"id":209},{"__isSmartRef__":true,"id":210},{"__isSmartRef__":true,"id":211},{"__isSmartRef__":true,"id":212},{"__isSmartRef__":true,"id":213},{"__isSmartRef__":true,"id":214},{"__isSmartRef__":true,"id":215},{"__isSmartRef__":true,"id":216},{"__isSmartRef__":true,"id":217},{"__isSmartRef__":true,"id":218},{"__isSmartRef__":true,"id":219},{"__isSmartRef__":true,"id":220},{"__isSmartRef__":true,"id":221},{"__isSmartRef__":true,"id":222},{"__isSmartRef__":true,"id":223},{"__isSmartRef__":true,"id":224},{"__isSmartRef__":true,"id":225},{"__isSmartRef__":true,"id":226},{"__isSmartRef__":true,"id":227},{"__isSmartRef__":true,"id":228},{"__isSmartRef__":true,"id":229},{"__isSmartRef__":true,"id":230},{"__isSmartRef__":true,"id":231},{"__isSmartRef__":true,"id":232},{"__isSmartRef__":true,"id":233},{"__isSmartRef__":true,"id":234},{"__isSmartRef__":true,"id":235}],"requiredModules":["users.Dan.ST72"],"__serializedExpressions__":["lastModifiedDate"],"__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo","__SourceModuleName__":"Global.lively.PartsBin","lastModifiedDate":"new Date(\"Wed Jul 30 2014 23:58:31 GMT-0700 (PDT)\")"},"209":{"author":"jenslincke","message":"no comment","id":"ADFBF069-513C-4DE6-95A9-8AD4985C6508","__serializedExpressions__":["date"],"date":"new Date(\"Tue Feb 04 2014 01:23:53 GMT-0800 (PST)\")"},"210":{"author":"robertkrahn","message":"no comment","id":"A452871F-4EB9-45D1-94B8-6065CBA7B8FD","__serializedExpressions__":["date"],"date":"new Date(\"Mon Jul 29 2013 23:20:51 GMT-0700 (PDT)\")"},"211":{"author":"SAPLivelyScreen","message":"no comment","id":"7A44D8CA-6D5F-42A3-A4B4-4D7F51EECA52","__serializedExpressions__":["date"],"date":"new Date(\"Tue Jun 18 2013 11:49:27 GMT-0700 (PDT)\")"},"212":{"author":"SAPLivelyScreen","message":"no comment","id":"EF145198-0649-41BD-A92E-521D98FEC49D","__serializedExpressions__":["date"],"date":"new Date(\"Wed May 29 2013 15:36:50 GMT-0700 (PDT)\")"},"213":{"author":"jenslincke","message":"added legend","id":"7ADA3049-56C1-4D32-874B-F664A79DDB20","__serializedExpressions__":["date"],"date":"new Date(\"Fri Jan 18 2013 07:47:05 GMT-0800 (PST)\")"},"214":{"author":"jenslincke","message":"no comment","id":"A4B86A7E-A398-4C29-BEE0-4AA045ABABD2","__serializedExpressions__":["date"],"date":"new Date(\"Fri Jan 18 2013 07:42:31 GMT-0800 (PST)\")"},"215":{"author":"jenslincke","message":"I want my blue rectangle back!","id":"5AA9291A-869F-4D36-8095-4721B5A5B205","__serializedExpressions__":["date"],"date":"new Date(\"Thu Nov 22 2012 01:35:51 GMT-0800 (PST)\")"},"216":{"author":"bgnauk","message":"no comment","id":"0124E570-50B7-4CE3-83A1-6E7BA89B5CD8","__serializedExpressions__":["date"],"date":"new Date(\"Mon Jun 18 2012 10:35:08 GMT-0700 (PDT)\")"},"217":{"author":"undefined","message":"suddenly, the rectangle became a CarDemo","id":"B5083AA8-9BAE-48DD-A6B4-FD7DB3998350","__serializedExpressions__":["date"],"date":"new Date(\"Mon Apr 09 2012 04:42:07 GMT-0700 (PDT)\")"},"218":{"author":"undefined","message":"css transitions","id":"1004E0FC-D96B-4F40-B3E0-F514A3FCFFD7","__serializedExpressions__":["date"],"date":"new Date(\"Wed Mar 14 2012 02:42:26 GMT-0700 (PDT)\")"},"219":{"author":"fbo","message":"","id":"BD1C654D-9100-4B66-BC62-B15FF2498B2B","__serializedExpressions__":["date"],"date":"new Date(\"Fri Feb 24 2012 17:59:09 GMT-0800 (PST)\")"},"220":{"author":"undefined","message":"sorry","id":"44B56D2E-9B59-4C67-A305-49A6E10E66C2","__serializedExpressions__":["date"],"date":"new Date(\"Wed Mar 14 2012 02:53:45 GMT-0700 (PDT)\")"},"221":{"author":"undefined","message":"whoopsie","id":"CEA5DCD5-2DB7-40AD-A776-262A7A0666FC","__serializedExpressions__":["date"],"date":"new Date(\"Thu May 03 2012 06:51:30 GMT-0700 (PDT)\")"},"222":{"author":"undefined","message":"whoopsie","id":"3F17A2D2-3C24-424B-B0FA-E43112267D23","__serializedExpressions__":["date"],"date":"new Date(\"Thu May 03 2012 06:51:36 GMT-0700 (PDT)\")"},"223":{"author":"jenslincke","message":"no comment","id":"AEB2F41B-2C88-4BBA-8875-93CD17CBA1C8","__serializedExpressions__":["date"],"date":"new Date(\"Wed Jan 23 2013 03:57:18 GMT-0800 (PST)\")"},"224":{"author":"robertkrahn","message":"no comment","id":"67FD74CD-7AE4-4050-ADC7-4DF73804258D","__serializedExpressions__":["date"],"date":"new Date(\"Thu May 30 2013 00:18:06 GMT-0700 (PDT)\")"},"225":{"author":"robertkrahn","message":"no comment","id":"FBBB9C99-B61C-4D5F-8750-6E2987DF0C9C","__serializedExpressions__":["date"],"date":"new Date(\"Thu Jun 20 2013 15:16:24 GMT-0700 (PDT)\")"},"226":{"author":"jenslincke","message":"no comment","id":"ECD12BFF-E872-4918-8341-C6571E72F36D","__serializedExpressions__":["date"],"date":"new Date(\"Tue Feb 04 2014 01:24:27 GMT-0800 (PST)\")"},"227":{"author":"lauritz","message":"dropping enabled for the blue rectangle","id":"81D350CB-D926-491F-8FF3-A6C9C831BDF2","__serializedExpressions__":["date"],"date":"new Date(\"Wed Mar 12 2014 07:00:28 GMT-0700 (PDT)\")"},"228":{"author":"Dan","message":"under construction","id":"8A9F879E-56AD-427A-B838-F1EBA119D846","__serializedExpressions__":["date"],"date":"new Date(\"Tue Jul 22 2014 09:08:53 GMT-0700 (PDT)\")"},"229":{"author":"Dan","message":"under construction","id":"91172F08-E434-41AB-9828-38CE9C17E3E2","__serializedExpressions__":["date"],"date":"new Date(\"Tue Jul 29 2014 00:03:14 GMT-0700 (PDT)\")"},"230":{"author":"Dan","message":"up to to to ;-)","id":"8D12AB54-9350-4793-8E1A-FFAF28B6F8DF","__serializedExpressions__":["date"],"date":"new Date(\"Tue Jul 29 2014 00:44:31 GMT-0700 (PDT)\")"},"231":{"author":"Dan","message":"up to isnew","id":"6CAEBB61-5224-484B-956E-7CC62FE52818","__serializedExpressions__":["date"],"date":"new Date(\"Tue Jul 29 2014 01:15:58 GMT-0700 (PDT)\")"},"232":{"author":"Dan","message":"no comment","id":"A96569C8-2ED6-4647-A7ED-4B7C74992CE7","__serializedExpressions__":["date"],"date":"new Date(\"Wed Jul 30 2014 23:33:43 GMT-0700 (PDT)\")"},"233":{"author":"Dan","message":"no comment","id":"067074F5-2F01-4814-A660-8A3E5C0AEFA7","__serializedExpressions__":["date"],"date":"new Date(\"Wed Jul 30 2014 23:38:40 GMT-0700 (PDT)\")"},"234":{"author":"Dan","message":"no comment","id":"E235A055-DD32-4D85-9C42-AADEC214B5E2","__serializedExpressions__":["date"],"date":"new Date(\"Wed Jul 30 2014 23:58:30 GMT-0700 (PDT)\")"},"235":{"author":"Dan","message":"no comment","id":"E08E5D1D-4C12-4507-96AF-B7D3E9825F28","__serializedExpressions__":["date"],"date":"new Date(\"Fri Aug 01 2014 17:13:06 GMT-0700 (PDT)\")"},"236":{"morph":{"__isSmartRef__":true,"id":41},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"237":{"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":238}},"238":{"test01IsMorph":{"__isSmartRef__":true,"id":239}},"239":{"varMapping":{"__isSmartRef__":true,"id":240},"source":"function test01IsMorph(aPart) {\n    this.assert(aPart.isMorph, 'rectangle should be a morph');\n}","funcProperties":{"__isSmartRef__":true,"id":241},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"240":{"this":{"__isSmartRef__":true,"id":237}},"241":{},"242":{"sClass":{"__isSmartRef__":true,"id":242},"instvars":[{"__isSmartRef__":true,"id":243}],"isClass":true,"__LivelyClassName__":"ST72Object","__SourceModuleName__":"Global.users.Dan.ST72"},"243":{},"244":{"class":{"__isSmartRef__":true,"id":242},"descriptor":{"__isSmartRef__":true,"id":245},"to":{"__isSmartRef__":true,"id":249},"read":{"__isSmartRef__":true,"id":252},"vector":{"__isSmartRef__":true,"id":254},"TITLE":"USER","DO":["read","eval"],"ARSIZE":0,"USER":{"__isSmartRef__":true,"id":256}},"245":{"sClass":{"__isSmartRef__":true,"id":242},"instvars":[{"__isSmartRef__":true,"id":246}],"isClass":true,"__LivelyClassName__":"ST72Object","__SourceModuleName__":"Global.users.Dan.ST72"},"246":{"loc":{"__isSmartRef__":true,"id":247},"offset":{"__isSmartRef__":true,"id":248}},"247":{"sClass":{"__isSmartRef__":true,"id":245},"instvars":["inst",1],"__LivelyClassName__":"ST72Object","__SourceModuleName__":"Global.users.Dan.ST72"},"248":{"sClass":{"__isSmartRef__":true,"id":245},"instvars":["inst",2],"__LivelyClassName__":"ST72Object","__SourceModuleName__":"Global.users.Dan.ST72"},"249":{"sClass":{"__isSmartRef__":true,"id":242},"instvars":[{"__isSmartRef__":true,"id":250}],"isClass":true,"__LivelyClassName__":"ST72Object","__SourceModuleName__":"Global.users.Dan.ST72"},"250":{"x":{"__isSmartRef__":true,"id":251},"TITLE":"to","DO":["CODE",19],"ARSIZE":1},"251":{"sClass":{"__isSmartRef__":true,"id":245},"instvars":["temp",0],"__LivelyClassName__":"ST72Object","__SourceModuleName__":"Global.users.Dan.ST72"},"252":{"sClass":{"__isSmartRef__":true,"id":242},"instvars":[{"__isSmartRef__":true,"id":253}],"isClass":true,"__LivelyClassName__":"ST72Object","__SourceModuleName__":"Global.users.Dan.ST72"},"253":{"TITLE":"read","DO":["CODE",2],"ARSIZE":0},"254":{"sClass":{"__isSmartRef__":true,"id":242},"instvars":[{"__isSmartRef__":true,"id":255}],"isClass":true,"__LivelyClassName__":"ST72Object","__SourceModuleName__":"Global.users.Dan.ST72"},"255":{"TITLE":"vector","DO":["CODE",3],"ARSIZE":0},"256":{"sClass":{"__isSmartRef__":true,"id":242},"instvars":[{"__isSmartRef__":true,"id":244}],"isClass":true,"__LivelyClassName__":"ST72Object","__SourceModuleName__":"Global.users.Dan.ST72"},"257":{"stClass":{"__isSmartRef__":true,"id":256},"dict":{"__isSmartRef__":true,"id":244},"temps":[],"code":["read","eval"],"pc":0,"caller":null,"message":null,"global":null,"instance":null,"mode":"eval","vm":{"__isSmartRef__":true,"id":41},"__LivelyClassName__":"ST72Context","__SourceModuleName__":"Global.users.Dan.ST72"},"258":{"resizeWidth":true,"resizeHeight":true},"259":{"aboutMe":{"__isSmartRef__":true,"id":260},"activate":{"__isSmartRef__":true,"id":263},"codeEscape":{"__isSmartRef__":true,"id":266},"codeRead":{"__isSmartRef__":true,"id":269},"codeTo":{"__isSmartRef__":true,"id":272},"codeVector":{"__isSmartRef__":true,"id":275},"doTo":{"__isSmartRef__":true,"id":278},"instantiate":{"__isSmartRef__":true,"id":281},"newContext":{"__isSmartRef__":true,"id":284},"occurrencesOf":{"__isSmartRef__":true,"id":287},"preEval":{"__isSmartRef__":true,"id":290},"printStack":{"__isSmartRef__":true,"id":293},"printVector":{"__isSmartRef__":true,"id":296},"reset":{"__isSmartRef__":true,"id":299},"run":{"__isSmartRef__":true,"id":302},"scanTokens":{"__isSmartRef__":true,"id":305},"st72ClassOf":{"__isSmartRef__":true,"id":308},"vectorFromTokens":{"__isSmartRef__":true,"id":311},"vecToString":{"__isSmartRef__":true,"id":314},"yetToDo":{"__isSmartRef__":true,"id":317},"doRestart":{"__isSmartRef__":true,"id":320},"readThroughUser":{"__isSmartRef__":true,"id":323},"doStep":{"__isSmartRef__":true,"id":326},"doRun":{"__isSmartRef__":true,"id":329},"doRunTo":{"__isSmartRef__":true,"id":332},"isAtom":{"__isSmartRef__":true,"id":335},"dropStringsFrom":{"__isSmartRef__":true,"id":338},"initObjects":{"__isSmartRef__":true,"id":341}},"260":{"varMapping":{"__isSmartRef__":true,"id":261},"source":"function aboutMe() {\n    // Smalltalk-72 redux\n    // This project is a JavaScript implementation of Smalltalk-72\n    // It attempts to be as close the original Smalltalk-72\n    // but, when complete, it will clean up a few things, and make a\n    // crucial completion by implementing Class and Context.\n    // Live contexts should then allow eval to be written as Context.step\n    // Thus making this the first metacircular Smalltalk-72\n    //\n    // This object is a scripted codeMorph, so it is easy to change the bootstrap\n    // See initClasses for the defs of ST72Object, etc\n    // this.userDict is the global dictionary\n    // USER is a ST72 class that shares that same dictionary\n    // Instances of the ST72 classes number, vector, atom, boolean', dictionary\n    //  are represented by actual JavaScript instances of\n\t//  Number, Array, String, Boolean, Object\n\t//  NOTE: right now both ST72 strings and atoms are JS string objects\n\t//  with isAtom or isString set to true.  But it will be more efficient\n\t//  for ST72 atoms to be JS strings\n\t//\n\t// The ST72 eval has two modes - eval and apply\n\t//  In eval mode, the pc is advanced and the next code token is looked up\n\t//  and activated with the current context as its caller and message stream\n\t//  In apply mode, the value (set by an earlier evaluation) is applied\n\t//  similarly.  This can probably be done without a mode by making apply\n\t//  be the default activity, and starting things by one call on eval\n}","funcProperties":{"__isSmartRef__":true,"id":262},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"261":{"this":{"__isSmartRef__":true,"id":41}},"262":{"user":"Dan","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Tue Jul 22 2014 09:06:07 GMT-0700 (PDT)\")"},"263":{"varMapping":{"__isSmartRef__":true,"id":264},"source":"function activate(cls, inst, caller) {\n    // Return a context initialized to run this class and instance\n    return this.newContext({\n            stClass: cls,\n            instance: inst,\n            caller: caller,\n            message: caller,\n            global: caller,\n            evalMode: 'eval'\n        });\n}","funcProperties":{"__isSmartRef__":true,"id":265},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"264":{"this":{"__isSmartRef__":true,"id":41}},"265":{"user":"Dan","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Tue Jul 22 2014 08:51:48 GMT-0700 (PDT)\")"},"266":{"varMapping":{"__isSmartRef__":true,"id":267},"source":"function codeEscape(escapeNo, ctxt) {\n    var caller = ctxt.caller;\n    switch(escapeNo) {\n        case 2:  // read -- define new functions, classes\n            caller.value = this.codeRead(this.inputLines);\n            caller.mode = 'apply';\n            return caller;\n        case 3:  // vector - eval and various primitive access\n            return this.codeVector(ctxt);\n        case 19: // to -- define new functions, classes\n            // debugger;  // need proper setup for doTo()\n            caller.value = this.codeTo(ctxt.message);\n            caller.mode = 'apply';\n            return caller;\n    }\n    this.transcript.crShow('Unrecognized code escape ' + Global.excapeNo)\n}","funcProperties":{"__isSmartRef__":true,"id":268},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"267":{"this":{"__isSmartRef__":true,"id":41}},"268":{"user":"Dan","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Sat Aug 02 2014 08:12:33 GMT-0700 (PDT)\")"},"269":{"varMapping":{"__isSmartRef__":true,"id":270},"source":"function codeRead(lines) {\n    var parenCount = 0;\n    var quoteCount = 0;\n    var buffer = '';\n    while (lines.length > 0) {\n        var line = lines.shift();\n        parenCount += this.occurrencesOf('(', line);\n        parenCount -= this.occurrencesOf(')', line);\n        quoteCount += this.occurrencesOf('\\'', line);\n        buffer += line + '\\n';\n        if (parenCount == 0 && quoteCount % 2 == 0) {\n            var tokens = this.scanTokens(buffer);\n            var result = this.dropStringsFrom(this.vectorFromTokens(tokens));\n            if (result.length>0) this.transcript.crShow(this.printVector(result));\n            return result;\n        }\n    }\n}","funcProperties":{"__isSmartRef__":true,"id":271},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"270":{"this":{"__isSmartRef__":true,"id":41}},"271":{"user":"Dan","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Sat Aug 02 2014 08:30:40 GMT-0700 (PDT)\")"},"272":{"varMapping":{"__isSmartRef__":true,"id":273},"source":"function codeTo(message) {\n    //Global.show('codeTo');\n    var title = message.nextToken();\n    var tempNames = [], ivars = [], cvars = [];\n    var token = message.nextToken();\n\n    while (this.isAtom(token) && token != ':') {\n        tempNames.push(token);\n        token = message.nextToken();\n    }\n    if (token instanceof Array) {\n        return this.doTo(title, tempNames, ivars, cvars, token);\n    }\n    if (token == ':')\n        token = message.nextToken();\n    else\n        Global.show('missing colon');\n    while (this.isAtom(token) && token != ':') {\n        ivars.push(token);\n        token = message.nextToken();\n    }\n    if (token instanceof Array) {\n        return this.doTo(title, tempNames, ivars, cvars, token);\n    }\n    if (token == ':')\n        token = message.nextToken();\n    else\n        Global.show('missing colon');\n    while (this.isAtom(token) && token != ':') {\n        cvars.push(token);\n        token = message.nextToken();\n    }\n    if (token instanceof Array) {\n        return this.doTo(title, tempNames, ivars, cvars, token);\n    } else\n        Global.show('missing code vector');\n    return 'errorinTo';\n}","funcProperties":{"__isSmartRef__":true,"id":274},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"273":{"this":{"__isSmartRef__":true,"id":41}},"274":{"user":"Dan","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Sat Aug 02 2014 08:24:36 GMT-0700 (PDT)\")"},"275":{"varMapping":{"__isSmartRef__":true,"id":276},"source":"function codeVector(ctxt) {\n    // this should peek for eval, and set up a subEval context to run itself\n    var msg = ctxt.message;\n    if (msg.matchToken('eval')) {\n    // Return a context initialized to run this class and instance\n        var evalCtxt = this.newContext({\n            stClass: msg.stClass,\n            instance: msg.instance,\n            caller: ctxt,\n            message: msg,\n            global: msg,\n            evalMode: 'eval',\n            subEval: true\n        });\n        evalCtxt.temps = msg.temps;  // share these\n        evalCtxt.code = ctxt.instance;\n        ctxt.mode = 'return';  // no apply after CODE 3\n        return evalCtxt\n        }\n    // Here check for, eg, length, [], etc\n    debugger;\n    //  Note CODE 3 has very special fall-through behavior --\n\t//\tif it does something, then it causes an active return (eg length)\n\t//\tif it doesn't do anything, then it applies false\n\t//\tif it sees [i to ..., then it applies true to invoke SUBSTR\"\n\n    ctxt.value = false;\n    ctxt.mode = 'apply';\n    return ctxt\n}","funcProperties":{"__isSmartRef__":true,"id":277},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"276":{"this":{"__isSmartRef__":true,"id":41}},"277":{"user":"Dan","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Tue Jul 29 2014 00:24:10 GMT-0700 (PDT)\")"},"278":{"varMapping":{"__isSmartRef__":true,"id":279},"source":"function doTo(title, tempNames, ivars, cvars, codeVector) {\n    // Change an existing class or make a new one\n\tvar theClass = this.userDict[title] || this.instantiate(\"class\", [{}]);\n\t// redef of USER must preserve global dict\n    var dict = (title == \"USER\") ? this.userDict : {};\n\t// dict[\"TABLE\"] = dict;  // really needed?\n\ttempNames.forEach(function(name, i) {\n\t    dict[name] = this.instantiate(\"descriptor\", [\"temp\",i])}, this);\n\tivars.forEach(function(name, i) {\n\t    dict[name] = this.instantiate(\"descriptor\", [\"ivar\",i])}, this);\n\t// NOTE: if ivars changes, we should make a new class so old insts can hold old class\n\tcvars.forEach(function(name, i) {dict[name] = dict[name] || null});\n\n\tdict[\"TITLE\"] = title;\n\tdict[\"DO\"] = codeVector;\n\tdict[\"ARSIZE\"] = tempNames.length;\n\ttheClass.instvars = [dict];\n\tthis.userDict[title] = theClass;\n\treturn title;\n}","funcProperties":{"__isSmartRef__":true,"id":280},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"279":{"this":{"__isSmartRef__":true,"id":41}},"280":{"user":"Dan","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Fri Jul 25 2014 13:12:36 GMT-0700 (PDT)\")"},"281":{"varMapping":{"__isSmartRef__":true,"id":282},"source":"function instantiate(sClass, instVars) {\n    if (!sClass.isClass) sClass = this.userDict[sClass];\n    if (!sClass.isClass) debugger;  // didn't find the class by name\n    var inst = new Global.ST72Object(sClass, instVars);\n    if (sClass === this.ST72Class) inst.isClass = true\n    return inst\n}","funcProperties":{"__isSmartRef__":true,"id":283},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"282":{"this":{"__isSmartRef__":true,"id":41}},"283":{"user":"Dan","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Fri Aug 01 2014 17:41:27 GMT-0700 (PDT)\")"},"284":{"varMapping":{"__isSmartRef__":true,"id":285},"source":"function newContext(spec) {\n    return new Global.ST72Context(spec.stClass, spec.caller, spec.message, spec.global, spec.instance, spec.value, spec.evalMode, spec.subEval, this);\n}","funcProperties":{"__isSmartRef__":true,"id":286},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"285":{"this":{"__isSmartRef__":true,"id":41}},"286":{"user":"Dan","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Fri Aug 01 2014 16:54:37 GMT-0700 (PDT)\")"},"287":{"varMapping":{"__isSmartRef__":true,"id":288},"source":"function occurrencesOf(char, line) {\n    // this.occurrencesOf(\"'\", \"abc'def\")\n    var count = 0;\n    for (var i = 0; i<line.length; i++) if(line[i]==char) count++\n    return count;\n}","funcProperties":{"__isSmartRef__":true,"id":289},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"288":{"this":{"__isSmartRef__":true,"id":41}},"289":{"user":"Dan","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Tue Jul 22 2014 08:51:48 GMT-0700 (PDT)\")"},"290":{"varMapping":{"__isSmartRef__":true,"id":291},"source":"function preEval(codeVector) {\n    // This version of eval runs before anything has been defined\n    // It assumes the codeVector is a to-definition, and it calls codeTo()\n    if (codeVector.length == 0)\n        return '';\n    if (codeVector.length == 1 && codeVector[0].isString)\n        return codeVector[0];\n    if (codeVector[0] != 'to') {\n        return 'preEval error - not a class def'; }\n\n    // Set up enough context so codeTo can read its message stream\n    var topCtxt = new Global.ST72Context();\n            topCtxt.temps = [];\n            topCtxt.code = codeVector;\n            topCtxt.pc = 1;  // points past \"to\"\n            topCtxt.vm = this;\n    var toCtxt = this.newContext({\n            caller: topCtxt,\n            message: topCtxt,\n            global: topCtxt,\n        });\n    return toCtxt.codeTo();\n}","funcProperties":{"__isSmartRef__":true,"id":292},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"291":{"this":{"__isSmartRef__":true,"id":41}},"292":{"user":"Dan","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Sat Aug 02 2014 08:31:24 GMT-0700 (PDT)\")"},"293":{"varMapping":{"__isSmartRef__":true,"id":294},"source":"function printStack() {  // show the ST72 stack\n    var stk = \"\";\n    for (var ctxt=this.activeContext; ctxt!=null; ctxt = ctxt.caller) {\n        stk = ctxt.printLine() + \"\\n\" + stk;\n    }\n    this.get('StackText').setTextString(stk);\n}","funcProperties":{"__isSmartRef__":true,"id":295},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"294":{"this":{"__isSmartRef__":true,"id":41}},"295":{"user":"Dan","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Mon Jul 28 2014 23:36:11 GMT-0700 (PDT)\")"},"296":{"varMapping":{"__isSmartRef__":true,"id":297},"source":"function printVector(v, pc) {\n    // if pc is not null, then show an arrow before that token position\n    var str = '(';\n    var i = 0;\n    while (i < v.length) {\n        if (pc != null && pc == i) str += \"->\";\n        if (v[i] instanceof Array)\n            str += '(' + this.printVector(v[i]) + ') ';\n        else if (v[i].isString)\n            str += \"'\" + (v[i].length<10 ? v[i] : v[i].slice(0,9)+'...') + \"' \";\n        else\n            str += v[i] + ' ';\n        i++;\n    }\n    if (pc != null && pc >= v.length) str += \"->\";\n    return str + ')';\n}","funcProperties":{"__isSmartRef__":true,"id":298},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"297":{"this":{"__isSmartRef__":true,"id":41}},"298":{"user":"Dan","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Mon Jul 28 2014 23:54:47 GMT-0700 (PDT)\")"},"299":{"varMapping":{"__isSmartRef__":true,"id":300},"source":"function reset() {\n    this.ST72Object = null;\n    this.ST72Class = null;\n    this.ST72Descriptor = null;\n    this.userDict = {};\n    this.transcript = this.get('Transcript');\n    this.transcript.setTextString(\"\");\n    this.activeContext = null;\n    this.stepCount = 0;\n    this.get('StepCountText').setTextString(this.stepCount.toString())\n    this.get('StackText').setTextString(\"\");\n}","funcProperties":{"__isSmartRef__":true,"id":301},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"300":{"this":{"__isSmartRef__":true,"id":41}},"301":{"user":"Dan","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Fri Aug 01 2014 17:38:56 GMT-0700 (PDT)\")"},"302":{"varMapping":{"__isSmartRef__":true,"id":303},"source":"function run(aContext) {\n    this.activeContext = aContext;\n    \n    // This is the basic interpreter loop\n    while(!this.activeContext.atEnd()) {\n        this.printStack();  console.log('-------');\n        this.transcript.crShow('step...' + this.activeContext.printLine());\n        this.activeContext = this.activeContext.step()\n    }\n    this.transcript.show('atEnd... ' + this.activeContext.printLine());\n}","funcProperties":{"__isSmartRef__":true,"id":304},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"303":{"this":{"__isSmartRef__":true,"id":41}},"304":{"user":"Dan","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Tue Jul 22 2014 08:51:48 GMT-0700 (PDT)\")"},"305":{"varMapping":{"__isSmartRef__":true,"id":306},"source":"function scanTokens(input) {\n    // This should use regex's but for now can handle the bootstrap\n    var tokens = [], i = 0;\n    if (input.length = 0)\n        return tokens;\n    var c = input[i++], loops = 0, token;\n    while (i < input.length && loops++ < 100) {\n        // White space\n        if (c == ' ' || c == '\\t' || c == '\\n' || c == '\\r') {\n            while (i < input.length) {\n                c = input[i++];\n                if (!(c == ' ' || c == '\\t' || c == '\\n' || c == '\\r'))\n                    break;\n            }\n            \n        // Normal atoms\n        } else if (c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z') {\n            token = c;\n            while (i < input.length) {\n                c = input[i++];\n                if (c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c >= '0' && c <= '9')\n                    token += c;\n                else\n                    break;\n            }\n            tokens.push(token);\n            \n        // Numbers (note; needs parseFlt)\n        } else if (c >= '0' && c <= '9') {\n            token = c;\n            while (i < input.length) {\n                c = input[i++];\n                if (c >= '0' && c <= '9' || c == '.' || c == 'e')\n                    token += c;\n                else\n                    break;\n            }\n            tokens.push(parseInt(token));\n            \n        // Character strings\n        } else if (c == '\\'') {\n            token = '';\n            while (i < input.length) {\n                c = input[i++];\n                if (c != '\\'')\n                    token += c;\n                else\n                    break;\n            }\n            token = new String(token);\n            token.isString = true;\n            tokens.push(token);\n            c = input[i++];\n            \n        // One-character atoms\n        } else {\n            tokens.push(c);\n            c = input[i++];\n        }\n    }\n    return tokens;\n}","funcProperties":{"__isSmartRef__":true,"id":307},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"306":{"this":{"__isSmartRef__":true,"id":41}},"307":{"user":"Dan","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Fri Jul 25 2014 13:37:14 GMT-0700 (PDT)\")"},"308":{"varMapping":{"__isSmartRef__":true,"id":309},"source":"function st72ClassOf(inst) {\n    // if inst is an ST72 instance, return its ST72 class\n    // If it's a JavaScript object, return its associated ST72 class\n    if (inst.sClass) return inst.sClass\n    if (inst instanceof Number) return this.userDict[\"number\"];\n    if (inst instanceof Array) return this.userDict[\"vector\"];\n    if (inst instanceof Boolean) return this.userDict[\"boolean\"];\n    if (this.isAtom(inst)) return this.userDict[\"atom\"];\n    if (inst.isString) return this.userDict[\"string\"];\n    if (inst.isDictionary) return this.userDict[\"dictionary\"];\n    debugger;\n}","funcProperties":{"__isSmartRef__":true,"id":310},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"309":{"this":{"__isSmartRef__":true,"id":41}},"310":{"user":"Dan","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Tue Jul 29 2014 01:38:53 GMT-0700 (PDT)\")"},"311":{"varMapping":{"__isSmartRef__":true,"id":312},"source":"function vectorFromTokens(tokens) {\n    var vec = [];\n    while (tokens.length > 0) {\n        var token = tokens.shift();\n        if (token == '(')\n            vec.push(this.vectorFromTokens(tokens));\n        else if (token == ')')\n            return vec;\n        else\n            vec.push(token);\n    }\n    return vec;\n}","funcProperties":{"__isSmartRef__":true,"id":313},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"312":{"this":{"__isSmartRef__":true,"id":41}},"313":{"user":"Dan","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Tue Jul 22 2014 08:51:48 GMT-0700 (PDT)\")"},"314":{"varMapping":{"__isSmartRef__":true,"id":315},"source":"function vecToString(vec) {\n    var str = '';\n    var i = 0;\n    str += '(';\n    while (i < vec.length) {\n        var token = vec[i++];\n        if (token.substring) {\n            if (token.isAtom)\n                str += token + ' ';\n            else\n                str += token + ' ';\n        } else if (token.toFixed) {\n            str += token.toString() + ' ';\n        } else if (token.forEach) {\n            str += this.vecToString(token) + ' ';\n        }\n    }\n    return str.slice(0, -1) + ')';\n}","funcProperties":{"__isSmartRef__":true,"id":316},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"315":{"this":{"__isSmartRef__":true,"id":41}},"316":{"user":"Dan","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Tue Jul 29 2014 01:03:17 GMT-0700 (PDT)\")"},"317":{"varMapping":{"__isSmartRef__":true,"id":318},"source":"function yetToDo() {\n    // Next to do\n    // [X]  Get class-defining \"to\" to work\n    // [X]  Put alias to userDict into USER, not class\n    // [X]  Find why it stops at 'if'\n    // [X]  Put show into context step\n    // [X]  Get it working with (read eval)\n    // [ ]  Check whether we really need all the this.ST72- things\n    // [X]  Put a dict field in every context, caching stClass.instvars[0]\n    // [X]  Use JS strings for ST atoms, and JS string objects (new String()) \n    //      with isString==true for ST strings\n    // [X]  Make a proper VM panel with reader and transcript\n    // [ ]  Figure some way to do classes in the OE\n}","funcProperties":{"__isSmartRef__":true,"id":319},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"318":{"this":{"__isSmartRef__":true,"id":41}},"319":{"user":"Dan","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Tue Jul 29 2014 00:48:31 GMT-0700 (PDT)\")"},"320":{"varMapping":{"__isSmartRef__":true,"id":321},"source":"function doRestart() {\n    this.reset();\n    this.initObjects();\n    this.readThroughUser();\n}","funcProperties":{"__isSmartRef__":true,"id":322},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"321":{"this":{"__isSmartRef__":true,"id":41}},"322":{"user":"Dan","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Fri Aug 01 2014 17:38:23 GMT-0700 (PDT)\")"},"323":{"varMapping":{"__isSmartRef__":true,"id":324},"source":"function readThroughUser() {\n    this.inputLines = this.get('BootstrapText').getTextString().split(/[\\n\\r]/);\n    this.inputLength = this.inputLines.length;\n    while (this.userDict.USER == null) {  // First few defs are spoon-fed\n        var tokenVector = this.codeRead(this.inputLines);\n        var result = this.preEval(tokenVector);\n    } \n    // Now USER has been defined with (read eval) so we can actually run it\n    this.activeContext = this.activate(this.userDict[\"USER\"], null, null);\n    this.printStack();\n    // Now call doStep or invoke it from VM UI 'Step' button\n}","funcProperties":{"__isSmartRef__":true,"id":325},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"324":{"this":{"__isSmartRef__":true,"id":41}},"325":{"user":"Dan","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Sat Aug 02 2014 08:23:22 GMT-0700 (PDT)\")"},"326":{"varMapping":{"__isSmartRef__":true,"id":327},"source":"function doStep() {\n    this.activeContext = this.activeContext.step()\n    if (this.activeContext == null)  //  restart USER\n        this.activeContext = this.activate(this.userDict[\"USER\"], null, null);\n    this.printStack();\n    this.stepCount++;\n    this.get('StepCountText').setTextString(this.stepCount.toString())\n}","funcProperties":{"__isSmartRef__":true,"id":328},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"327":{"this":{"__isSmartRef__":true,"id":41}},"328":{"user":"Dan","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Tue Jul 29 2014 00:33:36 GMT-0700 (PDT)\")"},"329":{"varMapping":{"__isSmartRef__":true,"id":330},"source":"function doRun() {\n    while (this.inputLines.length > 0) {\n        this.doStep()\n    }\n}","funcProperties":{"__isSmartRef__":true,"id":331},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"330":{"this":{"__isSmartRef__":true,"id":41}},"331":{"user":"Dan","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Sat Aug 02 2014 08:38:18 GMT-0700 (PDT)\")"},"332":{"varMapping":{"__isSmartRef__":true,"id":333},"source":"function doRunTo() {\n    this.doRestart();\n\n    // Extract the step count limit from the button(!)\n    var label = this.get('RunToButton').getLabel();  // like \"run to 14\"\n    var limit = Number(label.split(' ').last());\n\n    while (this.stepCount < limit) {\n        this.doStep()\n    }\n}","funcProperties":{"__isSmartRef__":true,"id":334},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"333":{"this":{"__isSmartRef__":true,"id":41}},"334":{"user":"Dan","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Fri Jul 25 2014 16:29:12 GMT-0700 (PDT)\")"},"335":{"varMapping":{"__isSmartRef__":true,"id":336},"source":"function isAtom(obj) {\n    return typeof obj == 'string'\n}","funcProperties":{"__isSmartRef__":true,"id":337},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"336":{"this":{"__isSmartRef__":true,"id":41}},"337":{"user":"Dan","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Fri Jul 25 2014 13:10:02 GMT-0700 (PDT)\")"},"338":{"varMapping":{"__isSmartRef__":true,"id":339},"source":"function dropStringsFrom(aVector) {\n/* Squeak...\n    ^ (anArray reject: [:item | item isMemberOf: String])\n\t\t\tcollect: [:item | (item isMemberOf: Array)\n\t\t\t\t\tifTrue: [self dropCommentsFrom: item]\n\t\t\t\t\tifFalse: [item]]\n*/\n    var self = this;\n    return aVector.reject(function(item) {return item.isString == true})\n                .collect(function(item) {return item instanceof Array\n                            ? self.dropStringsFrom(item)\n                            : item\n                })\n}","funcProperties":{"__isSmartRef__":true,"id":340},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"339":{"this":{"__isSmartRef__":true,"id":41}},"340":{"user":"Dan","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Tue Jul 29 2014 00:59:52 GMT-0700 (PDT)\")"},"341":{"varMapping":{"__isSmartRef__":true,"id":342},"source":"function initObjects() {\n    // Create class class\n    this.ST72Class = new Global.ST72Object();\n    this.ST72Class.sClass = this.ST72Class;\n    this.ST72Class.instvars = [{}];\n    this.ST72Class.isClass = true;\n\n    this.ST72Descriptor = new Global.ST72Object(this.ST72Class, {});\n    this.ST72Descriptor.isClass = true;\n    var dict = {    loc: this.instantiate(this.ST72Descriptor, [\"inst\", 1]),\n                    offset: this.instantiate(this.ST72Descriptor, [\"inst\", 2]) };\n    this.ST72Descriptor.instvars = [dict];\n\n    this.userDict = {};\n    this.userDict[\"class\"] = this.ST72Class;\n    this.userDict[\"descriptor\"] = this.ST72Descriptor;\n    \n}","funcProperties":{"__isSmartRef__":true,"id":343},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"342":{"this":{"__isSmartRef__":true,"id":41}},"343":{"user":"Dan","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Fri Aug 01 2014 17:40:12 GMT-0700 (PDT)\")"},"344":{"submorphs":[],"scripts":[],"shape":{"__isSmartRef__":true,"id":345},"_ClipMode":"visible","derivationIds":["E1B94746-BD49-43BF-A557-B68A93051084","E24EC190-D9B5-4DE4-842F-0BF57A869C48","B6D8644B-10B8-4DD6-AAF7-60BA324DEDE1"],"id":"8014BCE3-4234-4B6E-9305-CD3842746EC2","droppingEnabled":true,"halosEnabled":true,"type":"corner","_StyleClassNames":["Morph","Box","ReframeHandle","reframe-handle corner"],"layout":{"__isSmartRef__":true,"id":346},"owner":{"__isSmartRef__":true,"id":0},"eventHandler":{"__isSmartRef__":true,"id":347},"showsHalos":false,"__serializedExpressions__":["_Position"],"__LivelyClassName__":"lively.morphic.ReframeHandle","__SourceModuleName__":"Global.lively.morphic.Widgets","_Position":"lively.pt(614.0,649.0)"},"345":{"_BorderWidth":0,"_BorderColor":null,"_Fill":null,"__serializedExpressions__":["_Position","_Extent","_Padding"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(14.0,14.0)","_Padding":"lively.rect(0,0,0,0)"},"346":{"moveVertical":true,"moveHorizontal":true},"347":{"morph":{"__isSmartRef__":true,"id":344},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"348":{"submorphs":[],"scripts":[],"shape":{"__isSmartRef__":true,"id":349},"_ClipMode":"visible","derivationIds":["BC0D736C-4662-4D3A-9D88-F082BA876F5D","759E57DE-1B94-4EDC-9348-5547EF0F648D","366CEEF6-59CD-40AA-BEB0-2589745CF47D"],"id":"02AAE8CB-4724-4342-B82E-662978653B09","droppingEnabled":true,"halosEnabled":true,"type":"bottom","_StyleClassNames":["Morph","Box","ReframeHandle","reframe-handle bottom"],"layout":{"__isSmartRef__":true,"id":350},"owner":{"__isSmartRef__":true,"id":0},"eventHandler":{"__isSmartRef__":true,"id":351},"__serializedExpressions__":["_Position"],"__LivelyClassName__":"lively.morphic.ReframeHandle","__SourceModuleName__":"Global.lively.morphic.Widgets","_Position":"lively.pt(0.0,660.0)"},"349":{"_BorderWidth":0,"_BorderColor":null,"_Fill":null,"__serializedExpressions__":["_Position","_Extent","_Padding"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(614.0,3.0)","_Padding":"lively.rect(0,0,0,0)"},"350":{"moveVertical":true},"351":{"morph":{"__isSmartRef__":true,"id":348},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"352":{"submorphs":[],"scripts":[],"shape":{"__isSmartRef__":true,"id":353},"_ClipMode":"visible","derivationIds":["84295FA4-6AC7-489B-B926-11CF50652E79","D2F93E89-F17B-42EB-A526-B66F17866E55","9ED70583-83D7-4476-8E9F-CB4D4891EF3C"],"id":"04084092-745B-4AD7-96A6-45ACCF23EF11","droppingEnabled":true,"halosEnabled":true,"type":"right","_StyleClassNames":["Morph","Box","ReframeHandle","reframe-handle right"],"layout":{"__isSmartRef__":true,"id":354},"owner":{"__isSmartRef__":true,"id":0},"eventHandler":{"__isSmartRef__":true,"id":355},"__serializedExpressions__":["_Position"],"__LivelyClassName__":"lively.morphic.ReframeHandle","__SourceModuleName__":"Global.lively.morphic.Widgets","_Position":"lively.pt(625.0,0.0)"},"353":{"_BorderWidth":0,"_BorderColor":null,"_Fill":null,"__serializedExpressions__":["_Position","_Extent","_Padding"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(3.0,649.0)","_Padding":"lively.rect(0,0,0,0)"},"354":{"moveHorizontal":true},"355":{"morph":{"__isSmartRef__":true,"id":352},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"356":{"_BorderWidth":0,"_BorderColor":null,"_Fill":null,"_StrokeOpacity":false,"_BorderRadius":false,"_AppearanceStylingMode":true,"_BorderStylingMode":true,"__serializedExpressions__":["_Padding","_Extent","_Position"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Padding":"lively.rect(0,0,0,0)","_Extent":"lively.pt(628.0,663.0)","_Position":"lively.pt(0.0,0.0)"},"357":{"adjustForNewBounds":true},"358":{"a":1,"b":0,"c":0,"d":1,"e":565,"f":581,"__LivelyClassName__":"lively.morphic.Similitude","__SourceModuleName__":"Global.lively.morphic.Graphics"},"359":{"a":1,"b":0,"c":0,"d":1,"e":557,"f":62,"__LivelyClassName__":"lively.morphic.Similitude","__SourceModuleName__":"Global.lively.morphic.Graphics"},"360":{"morph":{"__isSmartRef__":true,"id":0},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"361":{"partsSpaceName":"PartsBin/Dan/","comment":"A cleaned up UI for ST72 redux","migrationLevel":8,"partName":"VMPanel3","changes":[{"__isSmartRef__":true,"id":362},{"__isSmartRef__":true,"id":363},{"__isSmartRef__":true,"id":364},{"__isSmartRef__":true,"id":365},{"__isSmartRef__":true,"id":366},{"__isSmartRef__":true,"id":367},{"__isSmartRef__":true,"id":368},{"__isSmartRef__":true,"id":369},{"__isSmartRef__":true,"id":370},{"__isSmartRef__":true,"id":371},{"__isSmartRef__":true,"id":372},{"__isSmartRef__":true,"id":373},{"__isSmartRef__":true,"id":374},{"__isSmartRef__":true,"id":375},{"__isSmartRef__":true,"id":376},{"__isSmartRef__":true,"id":377},{"__isSmartRef__":true,"id":378},{"__isSmartRef__":true,"id":379},{"__isSmartRef__":true,"id":380},{"__isSmartRef__":true,"id":381},{"__isSmartRef__":true,"id":382},{"__isSmartRef__":true,"id":383},{"__isSmartRef__":true,"id":384},{"__isSmartRef__":true,"id":385},{"__isSmartRef__":true,"id":386},{"__isSmartRef__":true,"id":387},{"__isSmartRef__":true,"id":388},{"__isSmartRef__":true,"id":389},{"__isSmartRef__":true,"id":390}],"requiredModules":["users.Dan.ST72"],"__serializedExpressions__":["lastModifiedDate"],"__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo","__SourceModuleName__":"Global.lively.PartsBin","lastModifiedDate":"new Date(\"Fri Aug 01 2014 18:12:24 GMT-0700 (PDT)\")"},"362":{"author":"Dan","message":"no comment","id":"E08E5D1D-4C12-4507-96AF-B7D3E9825F28","__serializedExpressions__":["date"],"date":"new Date(\"Fri Aug 01 2014 17:13:06 GMT-0700 (PDT)\")"},"363":{"author":"Dan","message":"no comment","id":"E235A055-DD32-4D85-9C42-AADEC214B5E2","__serializedExpressions__":["date"],"date":"new Date(\"Wed Jul 30 2014 23:58:30 GMT-0700 (PDT)\")"},"364":{"author":"Dan","message":"no comment","id":"067074F5-2F01-4814-A660-8A3E5C0AEFA7","__serializedExpressions__":["date"],"date":"new Date(\"Wed Jul 30 2014 23:38:40 GMT-0700 (PDT)\")"},"365":{"author":"Dan","message":"no comment","id":"A96569C8-2ED6-4647-A7ED-4B7C74992CE7","__serializedExpressions__":["date"],"date":"new Date(\"Wed Jul 30 2014 23:33:43 GMT-0700 (PDT)\")"},"366":{"author":"Dan","message":"up to isnew","id":"6CAEBB61-5224-484B-956E-7CC62FE52818","__serializedExpressions__":["date"],"date":"new Date(\"Tue Jul 29 2014 01:15:58 GMT-0700 (PDT)\")"},"367":{"author":"Dan","message":"up to to to ;-)","id":"8D12AB54-9350-4793-8E1A-FFAF28B6F8DF","__serializedExpressions__":["date"],"date":"new Date(\"Tue Jul 29 2014 00:44:31 GMT-0700 (PDT)\")"},"368":{"author":"Dan","message":"under construction","id":"91172F08-E434-41AB-9828-38CE9C17E3E2","__serializedExpressions__":["date"],"date":"new Date(\"Tue Jul 29 2014 00:03:14 GMT-0700 (PDT)\")"},"369":{"author":"Dan","message":"under construction","id":"8A9F879E-56AD-427A-B838-F1EBA119D846","__serializedExpressions__":["date"],"date":"new Date(\"Tue Jul 22 2014 09:08:53 GMT-0700 (PDT)\")"},"370":{"author":"lauritz","message":"dropping enabled for the blue rectangle","id":"81D350CB-D926-491F-8FF3-A6C9C831BDF2","__serializedExpressions__":["date"],"date":"new Date(\"Wed Mar 12 2014 07:00:28 GMT-0700 (PDT)\")"},"371":{"author":"jenslincke","message":"no comment","id":"ECD12BFF-E872-4918-8341-C6571E72F36D","__serializedExpressions__":["date"],"date":"new Date(\"Tue Feb 04 2014 01:24:27 GMT-0800 (PST)\")"},"372":{"author":"robertkrahn","message":"no comment","id":"FBBB9C99-B61C-4D5F-8750-6E2987DF0C9C","__serializedExpressions__":["date"],"date":"new Date(\"Thu Jun 20 2013 15:16:24 GMT-0700 (PDT)\")"},"373":{"author":"robertkrahn","message":"no comment","id":"67FD74CD-7AE4-4050-ADC7-4DF73804258D","__serializedExpressions__":["date"],"date":"new Date(\"Thu May 30 2013 00:18:06 GMT-0700 (PDT)\")"},"374":{"author":"jenslincke","message":"no comment","id":"AEB2F41B-2C88-4BBA-8875-93CD17CBA1C8","__serializedExpressions__":["date"],"date":"new Date(\"Wed Jan 23 2013 03:57:18 GMT-0800 (PST)\")"},"375":{"author":"undefined","message":"whoopsie","id":"3F17A2D2-3C24-424B-B0FA-E43112267D23","__serializedExpressions__":["date"],"date":"new Date(\"Thu May 03 2012 06:51:36 GMT-0700 (PDT)\")"},"376":{"author":"undefined","message":"whoopsie","id":"CEA5DCD5-2DB7-40AD-A776-262A7A0666FC","__serializedExpressions__":["date"],"date":"new Date(\"Thu May 03 2012 06:51:30 GMT-0700 (PDT)\")"},"377":{"author":"undefined","message":"sorry","id":"44B56D2E-9B59-4C67-A305-49A6E10E66C2","__serializedExpressions__":["date"],"date":"new Date(\"Wed Mar 14 2012 02:53:45 GMT-0700 (PDT)\")"},"378":{"author":"fbo","message":"","id":"BD1C654D-9100-4B66-BC62-B15FF2498B2B","__serializedExpressions__":["date"],"date":"new Date(\"Fri Feb 24 2012 17:59:09 GMT-0800 (PST)\")"},"379":{"author":"undefined","message":"css transitions","id":"1004E0FC-D96B-4F40-B3E0-F514A3FCFFD7","__serializedExpressions__":["date"],"date":"new Date(\"Wed Mar 14 2012 02:42:26 GMT-0700 (PDT)\")"},"380":{"author":"undefined","message":"suddenly, the rectangle became a CarDemo","id":"B5083AA8-9BAE-48DD-A6B4-FD7DB3998350","__serializedExpressions__":["date"],"date":"new Date(\"Mon Apr 09 2012 04:42:07 GMT-0700 (PDT)\")"},"381":{"author":"bgnauk","message":"no comment","id":"0124E570-50B7-4CE3-83A1-6E7BA89B5CD8","__serializedExpressions__":["date"],"date":"new Date(\"Mon Jun 18 2012 10:35:08 GMT-0700 (PDT)\")"},"382":{"author":"jenslincke","message":"I want my blue rectangle back!","id":"5AA9291A-869F-4D36-8095-4721B5A5B205","__serializedExpressions__":["date"],"date":"new Date(\"Thu Nov 22 2012 01:35:51 GMT-0800 (PST)\")"},"383":{"author":"jenslincke","message":"no comment","id":"A4B86A7E-A398-4C29-BEE0-4AA045ABABD2","__serializedExpressions__":["date"],"date":"new Date(\"Fri Jan 18 2013 07:42:31 GMT-0800 (PST)\")"},"384":{"author":"jenslincke","message":"added legend","id":"7ADA3049-56C1-4D32-874B-F664A79DDB20","__serializedExpressions__":["date"],"date":"new Date(\"Fri Jan 18 2013 07:47:05 GMT-0800 (PST)\")"},"385":{"author":"SAPLivelyScreen","message":"no comment","id":"EF145198-0649-41BD-A92E-521D98FEC49D","__serializedExpressions__":["date"],"date":"new Date(\"Wed May 29 2013 15:36:50 GMT-0700 (PDT)\")"},"386":{"author":"SAPLivelyScreen","message":"no comment","id":"7A44D8CA-6D5F-42A3-A4B4-4D7F51EECA52","__serializedExpressions__":["date"],"date":"new Date(\"Tue Jun 18 2013 11:49:27 GMT-0700 (PDT)\")"},"387":{"author":"robertkrahn","message":"no comment","id":"A452871F-4EB9-45D1-94B8-6065CBA7B8FD","__serializedExpressions__":["date"],"date":"new Date(\"Mon Jul 29 2013 23:20:51 GMT-0700 (PDT)\")"},"388":{"author":"jenslincke","message":"no comment","id":"ADFBF069-513C-4DE6-95A9-8AD4985C6508","__serializedExpressions__":["date"],"date":"new Date(\"Tue Feb 04 2014 01:23:53 GMT-0800 (PST)\")"},"389":{"author":"Dan","message":"no comment","id":"6AB282A1-48BC-4A79-B06C-97EC3A3FC535","__serializedExpressions__":["date"],"date":"new Date(\"Fri Aug 01 2014 18:12:22 GMT-0700 (PDT)\")"},"390":{"__serializedExpressions__":["date"],"author":"Dan","message":"no comment","id":"4453E1C5-3AA8-4BF2-B2C4-0094B4AF737C","date":"new Date(\"Sat Aug 02 2014 09:04:23 GMT-0700 (PDT)\")"},"isSimplifiedRegistry":true}}