// ---- End Project Data ---- // ---- File main.t ---- myBase := {title: "Shell Game", viewBounds: {left: -1, top: 64, right: 233, bottom: 282}, _proto: protoApp, debug: "myBase" }; shellOne := /* child of myBase */ { 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(); 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, _proto: protoExpandoShell, debug: "shellOne" }; // View shellOne is declared to myBase shellTwo := /* child of myBase */ { 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(); 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, _proto: protoExpandoShell, debug: "shellTwo" }; // View shellTwo is declared to myBase // ---- Beginning of section for non used Layout files ---- // End of output