// Text of project shellGame written on 5/14/95 at 10:44 PM // Beginning of file shellGame.t myBase := {title: "Shell Game", viewBounds: {left: -1, top: 64, right: 233, bottom: 282}, debug: "myBase", _proto: @157 }; shellOne := { viewSetupFormScript: func() begin self.target := self; //call this after setting up the lines array inherited:?viewSetupFormScript() end, FlushEdits: func() begin nil end, lines: [{_proto: protoTextExpando, label: "Override", path: 'deleteThis, entryFlags: (1 << 0) + (65535 << 9)}, {_proto: protoTextExpando, label: "Override", path: 'deleteThis, entryFlags: (1 << 0) + (65535 << 9)}, {_proto: protoTextExpando, label: "These", path: 'deleteThis, entryFlags: (1 << 0) + (65535 << 9)}], numLines: 3, editWidth: 110, editHeight: 50, deleteThis: "delete", viewBounds: {left: 3, top: 27, right: 118, bottom: 190}, indent: 50, viewClickScript: func(unit) begin // call the inherited script for proper behavior inherited:?viewClickScript(unit); // the inherited call correctly sets the split // variable to the currently open item // use that to expand the line on the other expando. // Note that you have to send the redoChildren message // to update the other expando shellTwo:ExpandLine(split); shellTwo:RedoChildren(); nil ; end, fromTwo: nil, DoExpandNone: func() begin // first call the inherited method to do the right thing inherited:ExpandNone(); // now check if I need to close the expanded item // use the sync variable that the other shell will set if not fromTwo then begin shellTwo.fromOne := true ; shellTwo:ExpandNone(); end; else fromTwo := nil ; end, ExpandNone: func() begin // since this gets called with a bum context due to // an AddDeferredAction, you need to send a message // to the shell directly so that it can do an // inherited call of the ExpandNone message. // see DoExpandNone... shellOne:DoExpandNone(); end, debug: "shellOne", _proto: @175 }; AddStepForm(myBase, shellOne); StepDeclare(myBase, shellOne, 'shellOne); shellTwo := { viewSetupFormScript: func() begin self.target := self; //call this after setting up the lines array inherited:?viewSetupFormScript() end, FlushEdits: func() begin nil end, lines: [{_proto: protoTextExpando, label: "Override", path: 'deleteThis, entryFlags: (1 << 0) + (65535 << 9)}, {_proto: protoTextExpando, label: "Override", path: 'deleteThis, entryFlags: (1 << 0) + (65535 << 9)}, {_proto: protoTextExpando, label: "These", path: 'deleteThis, entryFlags: (1 << 0) + (65535 << 9)}], numLines: 3, editWidth: 110, editHeight: 50, deleteThis: "delete", viewBounds: {left: 120, top: 27, right: 235, bottom: 190}, indent: 50, viewClickScript: func(unit) begin inherited:?viewClickScript(unit); shellOne:ExpandLine(split); shellOne:RedoChildren(); nil ; end, fromOne: nil, DoExpandNone: func() begin inherited:ExpandNone(); if not fromOne then begin shellOne.fromTwo := true ; shellOne:ExpandNone(); end; else fromOne := nil ; end, ExpandNone: func() begin shellTwo:DoExpandNone(); end, debug: "shellTwo", _proto: @175 }; AddStepForm(myBase, shellTwo); StepDeclare(myBase, shellTwo, 'shellTwo); constant |layout_shellGame.t| := myBase; // End of file shellGame.t