home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-02-28 | 5.2 KB | 233 lines | [TEXT/MPS ] |
-
- // ---- End Project Data ----
-
-
- // ---- File main.t ----
-
- // Before Script for "myBase"
- // Copyright © 1993, 1994 by Apple Computer, Inc. All rights reserved.
-
- myBase :=
- {title: "Modal Fun",
- viewBounds: {left: -4, top: 98, right: 223, bottom: 261},
- doModal:
- func(theView)
- begin
- // send the ModalDialog message to the view
- // identified by theModalView
- // this is done as a deferred action.
- // see the buttonClickScript in the protoTextButton
- theView:ModalDialog();
- end,
- viewQuitScript:
- func()
- begin
- if theModal then
- theModal:?Close();
- end,
- _proto: protoApp,
- debug: "myBase"
- };
-
-
- // Before Script for "_view000"
- // Copyright © 1993, 1994 by Apple Computer, Inc. All rights reserved.
-
- _view000 := /* child of myBase */
- {text: "Modal Me",
- buttonClickScript:
- func()
- begin
- // MUST send the ModalDialog message as a deferred
- // action, otherwise events can go awry.
- AddDeferredAction(doModal, [theModal]);
- end,
- viewBounds: {left: 74, top: 122, right: 148, bottom: 140},
- _proto: protoTextButton
- };
-
-
-
- // ---- File modal.t ----
-
- // Before Script for "theModal"
- // Copyright © 1993, 1994 by Apple Computer, Inc. All rights reserved.
-
- theModal := /* child of myBase */
- {viewFlags: 512,
- viewFormat: 256,
- viewBounds: {left: 0, top: 0, right: 0, bottom: 0},
- viewJustify: 240,
- declareSelf: 'modal,
- viewClickScript:
- // viewClickScript to absorb all taps.
-
- func(unit)
- begin
- print("click");
- TRUE;
- end,
- viewclass: 74,
- debug: "theModal"
- };
- // View theModal is declared to myBase
-
-
- // Before Script for "_view001"
- // Copyright © 1993, 1994 by Apple Computer, Inc. All rights reserved.
-
- _view001 := /* child of theModal */
- {viewFlags: 1,
- viewFormat: 83886673,
- viewBounds: {left: 32, top: 24, right: 216, bottom: 136},
- viewclass: 74
- };
-
-
- // Before Script for "_view002"
- // Copyright © 1993, 1994 by Apple Computer, Inc. All rights reserved.
-
- _view002 := /* child of _view001 */
- {text: "OK",
- buttonClickScript:
- func()
- begin
- // the topmost clView for this dialog has a declareSelf
- // slot with the value 'modal, so this will close it.
- modal:Close();
- end,
- viewBounds: {left: 34, top: 82, right: 90, bottom: 98},
- _proto: protoTextButton
- };
-
-
-
-
- // Before Script for "_view003"
- // Copyright © 1993, 1994 by Apple Computer, Inc. All rights reserved.
-
- _view003 := /* child of _view001 */
- {text: "Ick... A Modal dialog! Ick!",
- viewBounds: {left: 25, top: 33, right: 153, bottom: 49},
- _proto: protoStaticText
- };
-
-
-
-
- // Before Script for "_view004"
- // Copyright © 1993, 1994 by Apple Computer, Inc. All rights reserved.
-
- _view004 := /* child of _view001 */
- {text: "Cancel",
- buttonClickScript:
- func()
- begin
- // the topmost clView for this dialog has a declareSelf
- // slot with the value 'modal, so this will close it.
- modal:Close();
- end,
- viewBounds: {left: 107, top: 83, right: 163, bottom: 99},
- _proto: protoTextButton
- };
-
-
-
-
-
-
- // ---- Back in File main.t ----
-
-
-
-
-
- // ---- Beginning of section for non used Layout files ----
-
- // ---- File modal.t ----
-
- // Before Script for "_view005"
- // Copyright © 1993, 1994 by Apple Computer, Inc. All rights reserved.
-
- _view005 :=
- {viewFlags: 512,
- viewFormat: 256,
- viewBounds: {left: 0, top: 0, right: 0, bottom: 0},
- viewJustify: 240,
- declareSelf: 'modal,
- viewClickScript:
- // viewClickScript to absorb all taps.
-
- func(unit)
- begin
- print("click");
- TRUE;
- end,
- viewclass: 74
- };
-
-
- // Before Script for "_view006"
- // Copyright © 1993, 1994 by Apple Computer, Inc. All rights reserved.
-
- _view006 := /* child of _view005 */
- {viewFlags: 1,
- viewFormat: 83886673,
- viewBounds: {left: 32, top: 24, right: 216, bottom: 136},
- viewclass: 74
- };
-
-
- // Before Script for "_view007"
- // Copyright © 1993, 1994 by Apple Computer, Inc. All rights reserved.
-
- _view007 := /* child of _view006 */
- {text: "OK",
- buttonClickScript:
- func()
- begin
- // the topmost clView for this dialog has a declareSelf
- // slot with the value 'modal, so this will close it.
- modal:Close();
- end,
- viewBounds: {left: 34, top: 82, right: 90, bottom: 98},
- _proto: protoTextButton
- };
-
-
-
-
- // Before Script for "_view008"
- // Copyright © 1993, 1994 by Apple Computer, Inc. All rights reserved.
-
- _view008 := /* child of _view006 */
- {text: "Ick... A Modal dialog! Ick!",
- viewBounds: {left: 25, top: 33, right: 153, bottom: 49},
- _proto: protoStaticText
- };
-
-
-
-
- // Before Script for "_view009"
- // Copyright © 1993, 1994 by Apple Computer, Inc. All rights reserved.
-
- _view009 := /* child of _view006 */
- {text: "Cancel",
- buttonClickScript:
- func()
- begin
- // the topmost clView for this dialog has a declareSelf
- // slot with the value 'modal, so this will close it.
- modal:Close();
- end,
- viewBounds: {left: 107, top: 83, right: 163, bottom: 99},
- _proto: protoTextButton
- };
-
-
-
-
-
-
- // End of output