// ---- End Project Data ---- // ---- File rollBrowser.t ---- // Before Script for "_view000" // Copyright © 1993-4 by Apple Computer, Inc. All rights reserved. _view000 := {rollItems: nil, title: "RollBrowser", viewBounds: {left: 0, top: 0, right: 240, bottom: 336} , AddItem: func(overviewText, checkBoxString, checkValueArrayIndex, checkedP) begin local newItem := {_proto: pt_myProtoRollitem}; newItem.overview := Clone(overviewText); newItem.dataIndex := checkValueArrayIndex; newItem.checkString := Clone(checkBoxString); AddArraySlot(rollItems, newItem); AddArraySlot(checkValueArray, checkedP); if GetView(self) then :RedoChildren(); end, viewSetupFormScript: func() begin self.rollItems := [] ; self.checkValueArray := []; self.target := self ; :addItem("First Item Overview", "Item 1", 0, true); :addItem("Yet Another Item", "Item 2", 1, nil); local b := GetAppParams(); constant kMaxAppWidth := 240; constant kMaxAppHeight := 336; viewBounds := RelBounds(b.appAreaTop, b.appAreaLeft, MIN(b.AppAreaWidth, kMaxAppWidth), MIN(b.appAreaHeight, kMaxAppHeight)); end, checkValueArray: nil, target: nil, declareSelf: 'base, _proto: protoRollBrowser }; // Before Script for "_view001" // Copyright © 1993-4 by Apple Computer, Inc. All rights reserved. _view001 := /* child of _view000 */ {text: "Add Item", buttonClickScript: func() begin itemNum := length(rollItems) + 1; base:AddItem("Item" && NumberStr(itemNum), "Check This" && NumberStr(itemNum), itemNum-1, (Random(0,1) = 1)); end, viewBounds: {left: 154, top: 274, right: 226, bottom: 298}, _proto: protoTextButton }; // ---- Beginning of non-used User Protos ---- // ---- File myProtoRollItem ---- // Before Script for "anItem" // Copyright © 1993-4 by Apple Computer, Inc. All rights reserved. anItem := {height: 32, viewBounds: {top: 5, left: 2, right: -2, bottom: 30}, overview: "Overview Text", viewFormat: 167772753, dataIndex: 0, dataIndexSlot: 'checkValueArray, checkString: nil, _proto: protoRollItem, debug: "anItem" }; // Before Script for "_view002" // Copyright © 1993-4 by Apple Computer, Inc. All rights reserved. _view002 := /* child of anItem */ {text: "Untitled Check", viewBounds: {left: 8, top: 5, right: 112, bottom: 21}, valueChanged: func() begin SetValue(theText, 'text, if viewValue then "Checked" else "Unchecked"); target.(dataIndexSlot)[dataIndex] := self.viewValue ; end, viewSetupFormScript: func() begin self.viewValue := target.(dataIndexSlot)[dataIndex]; :valueChanged() ; if checkString then self.text := checkString ; end, _proto: protoCheckbox }; // Before Script for "theText" // Copyright © 1993-4 by Apple Computer, Inc. All rights reserved. theText := /* child of anItem */ {text: "\"\"", viewBounds: {left: 144, top: 5, right: 216, bottom: 21}, _proto: protoStaticText, debug: "theText" }; // View theText is declared to anItem // ---- End of non-used User Protos ---- // ---- Beginning of section for non used Layout files ---- // End of output