Listing: 1 MODULE Demo1; 2 (* 3 * REPERTOIRE 4 * Release 1.6 5 * By Charles Bradford and Cole Brecheen 6 * (c) Copyright 1985-1990 PMI 7 * Green Bay, WI 8 * All rights reserved 9 * (414) 468-6040 10 *) 11 12 IMPORT ControlUtils; 13 IMPORT DspFiles; 14 IMPORT ErrorManager; 15 IMPORT FramePainter; 16 IMPORT InputManager; 17 IMPORT NdxBones; 18 IMPORT NdxFiles; 19 IMPORT NdxTypes; 20 IMPORT PosUtils; 21 IMPORT Scrn2Ndx; 22 IMPORT ScrnTypes; 23 IMPORT ScrnUtl1; 24 IMPORT ScrnUtl2; 25 IMPORT VWindows; 26 IMPORT WindowPrims; 27 28 VAR 29 NdxFile: NdxTypes.NdxFileType; ***** ^ not supported yet 30 FrameVar: ScrnTypes.DisplayFrame; ***** ^ not supported yet 31 ScreenFile: ScrnTypes.DisplayFile; ***** ^ not supported yet 32 NextFrame: ScrnTypes.AFrameName; ***** ^ not supported yet 33 RecName: ARRAY [0..19] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 34 SavedHeight: CARDINAL; 35 36 BEGIN 37 SavedHeight := VWindows.GetCursorHeight( ***** ^ not supported yet ***** ^ not supported yet 38 VWindows.CurrentWindow ); ***** ^ not supported yet ***** ^ not supported yet 39 IF NOT NdxBones.OpenNdxFile( NdxFile, 'demo1.ndx' ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 40 (*If the file doesn't exist, create it.*) 41 NdxFiles.CreateNdxFile( NdxFile, 'demo1.ndx', ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 42 'RecName, age, job' ); ***** ^ not supported yet 43 END; 44 IF NOT DspFiles.OpenDisplayFile( ScreenFile, 'demo1.dsp' ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 45 ErrorManager.WARN( 'Could not open DEMO1.DSP' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 46 RETURN; ***** ^ bad RETURN 47 END; 48 ScrnTypes.InitDisplayFrame( FrameVar, VWindows.CurrentWindow ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 49 REPEAT 50 NextFrame := 'NameScrn'; ***** ^ not supported yet ***** ^ not supported yet 51 ControlUtils.ReadShowAndCntrl( ScreenFile, FrameVar, NextFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 52 (*This will always display the screen that says 53 "Enter a record name."*) 54 IF NOT PosUtils.Equal( NextFrame, ScrnTypes.ProgramExit ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 55 ScrnUtl1.GetFieldText( FrameVar, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 56 FrameVar^.CurrentField, RecName ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 57 DspFiles.ReadDisplayFrame( ScreenFile, FrameVar, 'EntryScreen' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 58 IF NOT Scrn2Ndx.FillScr( NdxFile, FrameVar, RecName, '') THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 59 ControlUtils.ChangeField( FrameVar, RecName, 'RecName', TRUE ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 60 END; 61 FramePainter.ShowDisplayFrame( FrameVar, 0, 0, 0, 0 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 62 InputManager.ControlFrame( FrameVar, 0, '', FALSE, NextFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 63 IF PosUtils.Equal( NextFrame, FrameVar^.normlnext ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 64 IF NOT Scrn2Ndx.PutScrRec(NdxFile, FrameVar, RecName,'') ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 65 THEN HALT(); END; ***** ^ undeclared identifier ***** ^ not supported yet 66 IF NOT NdxFiles.WriteRecord( NdxFile, RecName ) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 67 THEN HALT(); END; ***** ^ undeclared identifier ***** ^ not supported yet 68 END; 69 END; 70 UNTIL PosUtils.Equal( NextFrame, ScrnTypes.ProgramExit ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 71 ScrnUtl2.CloseDisplayFrame( FrameVar ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 72 NdxFiles.CloseNdxFile( NdxFile ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 73 VWindows.ClearPart( VWindows.CurrentWindow, 0, 0, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 74 VWindows.EndCol(VWindows.CurrentWindow), ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 75 VWindows.EndRow(VWindows.CurrentWindow) ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 76 VWindows.SetCursorHeight( VWindows.CurrentWindow, SavedHeight ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 77 END Demo1. 122 errors