// Text of project PhoneExpando written on 5/14/95 at 10:20 PM // Beginning of file myPhoneExpando // Before Script for "_userproto000" // Copyright © 1993-4 by Apple Computer, Inc. All rights reserved. _userproto000 := {phoneIndex: 0, path: 'phones, _proto: @194}; constant |layout_myPhoneExpando| := _userproto000; // End of file myPhoneExpando // Beginning of file PhoneExpando.t // Before Script for "myBase" // Copyright © 1993-4 by Apple Computer, Inc. All rights reserved. myBase := {viewBounds: {top: 0, left: 0, right: 240, bottom: 336}, declareSelf: 'base, title: "Phone Expando Test", viewSetupFormScript: func() begin local b := GetAppParams(); constant kMaxAppWidth := 240; constant kMaxAppHeight := 336; viewBounds := RelBounds(b.appAreaTop, b.appAreaLeft, MIN(b.appAreaWidth, kMaxAppWidth), MIN(b.appAreaHeight, kMaxAppHeight)); end, debug: "myBase", _proto: @157 }; // Before Script for "myExpando" // Copyright © 1993-4 by Apple Computer, Inc. All rights reserved. myExpando := { viewSetupFormScript: func() begin self.target := self; self.lines := Clone(baseLines) ; phones := [] ; AddArraySlot(phones, SetClass(Clone("800 555-1212"), 'workPhone)); AddArraySlot(phones, SetClass(Clone("408 555-1212"), 'homePhone)); // add protos (based on protoPhoneExpando) to proto shell :AddItem({_proto: GetLayout("myPhoneExpando")}); :AddItem({_proto: GetLayout("myPhoneExpando"), phoneIndex: 1}); end, FlushEdits: func() begin // don't need to do anything to save, just a demo! nil end, lines: nil, numLines: 2, editWidth: 200, editHeight: 50, deleteThis: "delete", viewBounds: {top: 24, left: 8, right: 232, bottom: 296}, baseLines: // just some defaults, from protoExpandoShell... [{_proto: protoTextExpando, label: "Override", path: 'deleteThis, entryFlags: (1 << 0) + (65535 << 9)}, {_proto: protoTextExpando, label: "These", path: 'deleteThis, entryFlags: (1 << 0) + (65535 << 9)}], phones: nil, AddItem: func(theItemProto) begin AddArraySlot(lines, Clone(theItemProto)); numLines := numLines + 1; // if the view is displayed, then update the children if GetView(self) then :RedoChildren(); end, debug: "myExpando", _proto: @175 }; AddStepForm(myBase, myExpando); StepDeclare(myBase, myExpando, 'myExpando); constant |layout_PhoneExpando.t| := myBase; // End of file PhoneExpando.t