Listing: 1 IMPLEMENTATION MODULE UserOps; 2 (* 3 * REPERTOIRE 4 * Release 1.6 5 * By Charles Bradford and Cole Brecheen 6 * (c) Copyright 1985-1992 PMI 7 * Green Bay, Wisconsin 8 * All rights reserved 9 * (414) 468-6040 10 * 11 * $Header: D:/logfiles/mods/userops.mov 1.7 10 Mar 1991 15:34:08 coleb $ 12 * 13 *) 14 15 16 (*EntryDiag: 17 IMPORT Diagnostics; 18 :EntryDiag*) 19 20 IMPORT BigSets; 21 IMPORT ByteFiddler; 22 IMPORT ControlUtils; 23 IMPORT DateFunctions; 24 IMPORT Editor; 25 IMPORT ErrorManager; 26 IMPORT FieldTypes; 27 IMPORT FramePainter; 28 IMPORT GenLists; 29 IMPORT Hash; 30 IMPORT InputManager; 31 IMPORT KbdInput; 32 IMPORT Key; 33 IMPORT ListUtils; 34 IMPORT LowLevel; 35 IMPORT M2Strings; 36 IMPORT MsgBox2; 37 IMPORT Numbers; 38 IMPORT NumInput; 39 IMPORT NumTypes; 40 IMPORT PosUtils; 41 IMPORT ScrnTypes; 42 IMPORT ScrnUtl1; 43 IMPORT StrConv; 44 IMPORT StrEdit; 45 IMPORT StrInput; 46 IMPORT SYSTEM; 47 IMPORT VEditor; 48 IMPORT VStorage; 49 IMPORT VWindows; 50 51 VAR 52 Initialized : BOOLEAN; 53 54 PROCEDURE ShowMemory( TheFrame: ScrnTypes.DisplayFrame ); ***** ^ not supported yet 55 VAR 56 tmpstr: ARRAY [0..31] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 57 msgstr: ARRAY [0..127] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 58 BEGIN 59 msgstr[0] := 0C; ***** ^ not supported yet ***** ^ not supported yet 60 IF VStorage.UsingEms() THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 61 StrEdit.Append( msgstr, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 62 'Expanded memory now available (in bytes): ' ); ***** ^ not supported yet 63 StrConv.LongIntegerToStr( VStorage.AvailMem(), 0, tmpstr ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 64 StrEdit.Append( msgstr, tmpstr ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 65 StrEdit.Append( msgstr, '. ' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 66 ELSE 67 msgstr := 'Expanded memory not in use. '; ***** ^ not supported yet ***** ^ not supported yet 68 END; 69 StrEdit.Append(msgstr, 'Stack available: ' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 70 StrConv.CardinalToStr(LowLevel.ofs(SYSTEM.ADR(msgstr))-127, 0, tmpstr); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 71 StrEdit.Append(msgstr, tmpstr); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 72 MsgBox2.StrMsgBoxExterior( TheFrame, VWindows.NE, msgstr ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 73 END ShowMemory; ***** ^ not supported yet 74 75 76 CONST 77 OldFunction = "Non-numeric frame name used with old function"; ***** ^ not supported yet 78 ExitMessage = 79 'You pressed the function key that terminates the program. Please confirm.'; ***** ^ not supported yet 80 81 82 PROCEDURE BetweenLongs( TheTxt: ARRAY OF CHAR; LoLong, HiLong: LONGINT) : ***** ^ not supported yet 83 BOOLEAN; 84 VAR 85 lvalue: LONGINT; 86 BEGIN 87 IF NOT StrConv.StrToLongInteger( TheTxt, 0, lvalue) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 88 (*StrToLongInteger skips over leading non-numeric 89 characters.*) 90 RETURN FALSE; 91 END; 92 RETURN (lvalue >= LoLong) AND (lvalue <= HiLong); 93 END BetweenLongs; ***** ^ not supported yet 94 95 96 PROCEDURE BetweenReals( TheTxt: ARRAY OF CHAR; LoReal, HiReal: ***** ^ not supported yet 97 NumTypes.Real8) : BOOLEAN; ***** ^ not supported yet 98 VAR 99 rvalue: NumTypes.Real8; ***** ^ not supported yet 100 BEGIN 101 IF NOT StrConv.StrToReal( TheTxt, 0, rvalue) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 102 (*StrToReal skips over leading non-numeric 103 characters.*) 104 RETURN FALSE; 105 END; 106 RETURN (rvalue >= LoReal) AND (rvalue <= HiReal) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 107 END BetweenReals; ***** ^ not supported yet 108 109 110 PROCEDURE DefaultKeyHandler( FrameRec : ScrnTypes.DisplayFrame; ***** ^ not supported yet 111 VAR LastKey: CARDINAL; VAR NextFrame: ScrnTypes.AFrameName ***** ^ not supported yet 112 ); 113 VAR 114 SavedKeyValue, keyhit: CARDINAL; 115 FieldRec: ScrnTypes.InputFieldRecord; ***** ^ not supported yet 116 BlankFrame : BOOLEAN; 117 HelpFrame: ScrnTypes.AFrameName; ***** ^ not supported yet 118 BEGIN 119 StrEdit.AssignStr( ScrnTypes.ContinueInput, NextFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 120 BlankFrame := ScrnUtl1.FieldGroupTotal( FrameRec ) = 0; ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 121 IF NOT BlankFrame THEN 122 ScrnUtl1.GetFieldRec( FrameRec, FrameRec^.CurrentField, FieldRec ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 123 END; 124 IF LastKey = HelpKey THEN ***** ^ undeclared identifier 125 IF (NOT BlankFrame) AND 126 (M2Strings.Length(FieldRec.HelpFrame) > 0) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 127 M2Strings.Assign( FieldRec.HelpFrame, HelpFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 128 ControlUtils.FrameSeq2( FrameRec^.FromFile, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 129 FrameRec^.ThisFrame, HelpFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 130 ELSIF M2Strings.Length(FrameRec^.HelpFrame) > 0 THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 131 M2Strings.Assign( FrameRec^.HelpFrame, HelpFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 132 ControlUtils.FrameSeq2( FrameRec^.FromFile, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 133 FrameRec^.ThisFrame, HelpFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 134 ELSIF NOT ListUtils.IsBlankList(FrameRec^.HelpList) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 135 MsgBox2.LstMsgBoxExterior( FrameRec, VWindows.NW, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 136 FrameRec^.HelpList ); ***** ^ not supported yet ***** ^ not supported yet 137 END; 138 InputManager.LookAlive( FrameRec ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 139 (* Restores pointer bar, correct prompt, highlighting, 140 etc., in case the input focus went somewhere else 141 during the help sequence. *) 142 LastKey := 0; 143 (*We don't want ControlFrame to do anything else with 144 this keystroke. We just want it to keep going.*) 145 ELSIF LastKey = TimeKey THEN ***** ^ undeclared identifier 146 SavedKeyValue := LastKey; 147 TimeKey := 65535; ***** ^ undeclared identifier 148 (*Disable MemoryKey while in the MemAvail box itself.*) 149 ShowMemory( FrameRec ); ***** ^ not supported yet ***** ^ not supported yet 150 TimeKey := SavedKeyValue; ***** ^ undeclared identifier 151 LastKey := 0; 152 ELSIF LastKey = BackupKey THEN ***** ^ undeclared identifier 153 M2Strings.Assign( FrameRec^.parent, NextFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 154 ELSIF LastKey = SubmitKey THEN ***** ^ undeclared identifier 155 IF NOT BlankFrame THEN 156 IF FieldRec.typ = ScrnTypes.GotoCode THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 157 M2Strings.Assign( FieldRec.ReturnVal, NextFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 158 ELSE 159 M2Strings.Assign( FrameRec^.normlnext, NextFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 160 END; 161 ELSE 162 M2Strings.Assign( FrameRec^.normlnext, NextFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 163 END; 164 ELSIF LastKey = ExitKey THEN ***** ^ undeclared identifier 165 SavedKeyValue := ExitKey; ***** ^ undeclared identifier 166 ExitKey := 65535; ***** ^ undeclared identifier 167 (* Disables ExitKey while user is in the ExitKey 168 message box itself. *) 169 IF MsgBox2.MsgOkay( FrameRec, VWindows.SW, ExitMessage ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 170 ErrorManager.CallHalt(''); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 171 (* 172 Logitech users 173 may want to do 174 this instead of 175 StraitToDOS if 176 it's important 177 that Logitech 178 TermProcs get 179 executed before 180 returning to DOS. 181 ErrorManager.DoTermProcs(); 182 RTSMain.Terminate(RTSMain.Normal); 183 *) 184 END; 185 InputManager.LookAlive( FrameRec ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 186 ExitKey := SavedKeyValue; ***** ^ undeclared identifier 187 LastKey := 0; 188 END; 189 END DefaultKeyHandler; ***** ^ not supported yet 190 191 192 PROCEDURE DefaultFieldHandler( FrameRec : 193 ScrnTypes.DisplayFrame; col1, row1: CARDINAL; VAR LastKey : ***** ^ not supported yet 194 CARDINAL; VAR NextFrame: ScrnTypes.AFrameName ); ***** ^ not supported yet 195 VAR 196 ChangeCheck1, ChangeCheck2, ChangeCheck3, Check1, Check2, 197 Check3, keyhit, CursorPos, width, spot: CARDINAL; 198 ok, done, InDecimals: BOOLEAN; 199 LocalNextFrame: ScrnTypes.AFrameName; ***** ^ not supported yet 200 TmpLegalKeys, InterestingKeys: KbdInput.KeyNumSet; ***** ^ not supported yet 201 FieldRec : ScrnTypes.InputFieldRecord; ***** ^ not supported yet 202 ImageRec : ScrnTypes.ImageElement; ***** ^ not supported yet 203 TheList : GenLists.GenList; ***** ^ not supported yet 204 date : DateFunctions.Date; ***** ^ not supported yet 205 EdRec : VEditor.AnEdControlRec; ***** ^ not supported yet 206 minusOK : BOOLEAN; 207 208 BEGIN 209 ScrnUtl1.GetFieldRec( FrameRec, FrameRec^.CurrentField, FieldRec ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 210 ScrnUtl1.GetFieldImageRec( FrameRec, FrameRec^.CurrentField, ImageRec ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 211 Hash.Compute( ImageRec.text, ChangeCheck1, ChangeCheck2, ChangeCheck3 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 212 width := M2Strings.Length(ImageRec.text); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 213 InDecimals := FALSE; 214 CursorPos := 0; 215 BigSets.SetUnion( FieldExitKeySet, FunctKeySet, InterestingKeys ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 216 ScrnUtl1.SetPointerBarColors( FrameRec ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 217 218 IF FieldRec.typ = FieldTypes.TypeCode( 'STRING' ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 219 TmpLegalKeys := StringKeySet; ***** ^ not supported yet ***** ^ undeclared identifier 220 (* If you want to change which keys are legal in 221 particular kinds of string fields, insert code here 222 that looks for the field type or the name of the field you're 223 interested in changing, and modify TmpLegalKeys with 224 routines from BigSets if you find it. *) 225 REPEAT 226 ScrnUtl1.SetPointerBarColors( FrameRec ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 227 StrInput.ReadWithEdits( FrameRec^.WindowHandle, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 228 ImageRec.text, col1, row1, width, CursorPos, ***** ^ not supported yet ***** ^ not supported yet 229 InsertMode, TRUE, LastKey, TmpLegalKeys, ***** ^ undeclared identifier ***** ^ not supported yet 230 InterestingKeys ); ***** ^ not supported yet 231 232 (* This is where you insert field validation code. 233 It's also where you put code to update a frame 234 dynamically as the user completes certain fields-- 235 use ChangeField, RedrawField, or RedrawArea to do 236 the latter.*) 237 238 ScrnUtl1.PutFieldImageRec( ImageRec, FrameRec, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 239 FrameRec^.CurrentField ); ***** ^ not supported yet ***** ^ not supported yet 240 (*Updates ImageList so that present state of the 241 string will be visible in TheKeyHandler.*) 242 TheKeyHandler( FrameRec, LastKey, LocalNextFrame ); ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 243 UNTIL BigSets.InSet(FieldExitKeySet, LastKey); ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 244 245 ELSIF FieldRec.typ = FieldTypes.TypeCode( 'INTEGER' ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 246 done := FALSE; 247 REPEAT 248 ScrnUtl1.SetPointerBarColors( FrameRec ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 249 (* Distinguish bewteen integers and cardinals based on iMin *) 250 IF FieldRec.iMin < NumTypes.L0 THEN (* JDM/MBC *) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 251 minusOK := TRUE; (* JDM/MBC *) 252 ELSE (* JDM/MBC *) 253 minusOK := FALSE; (* JDM/MBC *) 254 END; (* if FieldRec.iMin *) (* JDM/MBC *) 255 NumInput.ReadNumericField( FrameRec^.WindowHandle, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 256 ImageRec.text, col1, row1, width, 0, minusOK, ***** ^ not supported yet ***** ^ not supported yet 257 LastKey, InterestingKeys ); (* JDM/MBC *) ***** ^ not supported yet 258 (* The user can't tell that we're exiting and re- 259 entering ReadNumeric every time she presses one of 260 the InterestingKeys. *) 261 ScrnUtl1.PutFieldImageRec( ImageRec, FrameRec, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 262 FrameRec^.CurrentField ); ***** ^ not supported yet ***** ^ not supported yet 263 TheKeyHandler( FrameRec, LastKey, LocalNextFrame ); ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 264 IF BigSets.InSet(FieldExitKeySet, LastKey) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 265 IF (LastKey = ExitKey) OR (LastKey = BackupKey) THEN ***** ^ undeclared identifier ***** ^ undeclared identifier 266 done := TRUE; 267 ELSE 268 done := PosUtils.IsBlank(ImageRec.text) OR ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 269 BetweenLongs( ImageRec.text, FieldRec.iMin, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 270 FieldRec.iMax ); ***** ^ not supported yet ***** ^ not supported yet 271 IF NOT done THEN 272 MsgBox2.StrMsgBox( FrameRec, VWindows.NE, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 273 "Entry out of range. Press to continue." ); ***** ^ not supported yet 274 END; 275 END; 276 END; 277 UNTIL done; 278 279 ELSIF FieldRec.typ = FieldTypes.TypeCode( 'REAL' ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 280 done := FALSE; 281 REPEAT 282 ScrnUtl1.SetPointerBarColors( FrameRec ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 283 (* As with integers, range determines whether minus allowed *) 284 IF FieldRec.rMin < 0. THEN (* JDM/MBC *) ***** ^ not supported yet ***** ^ not supported yet 285 minusOK := TRUE; (* JDM/MBC *) 286 ELSE (* JDM/MBC *) 287 minusOK := FALSE; (* JDM/MBC *) 288 END; (* if FieldRec.rMin *) (* JDM/MBC *) 289 NumInput.ReadNumericField( FrameRec^.WindowHandle, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 290 ImageRec.text, col1, row1, width, FieldRec.decimalPlace, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 291 minusOK, LastKey, InterestingKeys ); (* JDM/MBC *) ***** ^ not supported yet 292 ScrnUtl1.PutFieldImageRec( ImageRec, FrameRec, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 293 FrameRec^.CurrentField ); ***** ^ not supported yet ***** ^ not supported yet 294 TheKeyHandler( FrameRec, LastKey, LocalNextFrame ); ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 295 IF BigSets.InSet(FieldExitKeySet, LastKey) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 296 IF (LastKey = ExitKey) OR (LastKey = BackupKey) THEN ***** ^ undeclared identifier ***** ^ undeclared identifier 297 done := TRUE; 298 ELSE 299 done := PosUtils.IsBlank(ImageRec.text) OR ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 300 BetweenReals( ImageRec.text, FieldRec.rMin, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 301 FieldRec.rMax ); ***** ^ not supported yet ***** ^ not supported yet 302 IF NOT done THEN 303 MsgBox2.StrMsgBox( FrameRec, VWindows.NE, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 304 "Entry out of range. Press to continue." ); ***** ^ not supported yet 305 END; 306 END; 307 END; 308 UNTIL done; 309 310 ELSIF FieldRec.typ = FieldTypes.TypeCode( 'DATE' ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 311 TmpLegalKeys := StringKeySet; ***** ^ not supported yet ***** ^ undeclared identifier 312 LOOP 313 StrInput.ReadWithEdits( FrameRec^.WindowHandle, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 314 ImageRec.text, col1, row1, width, CursorPos, ***** ^ not supported yet ***** ^ not supported yet 315 InsertMode, TRUE, LastKey, TmpLegalKeys, ***** ^ undeclared identifier ***** ^ not supported yet 316 InterestingKeys ); ***** ^ not supported yet 317 318 ScrnUtl1.PutFieldImageRec( ImageRec, FrameRec, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 319 FrameRec^.CurrentField ); ***** ^ not supported yet ***** ^ not supported yet 320 TheKeyHandler( FrameRec, LastKey, LocalNextFrame ); ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 321 IF BigSets.InSet(FieldExitKeySet, LastKey) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 322 IF PosUtils.IsBlank(ImageRec.text) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 323 EXIT; 324 END; 325 DateFunctions.StrToDate(ImageRec.text, date, ok); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 326 IF ok OR (LastKey = BackupKey) THEN ***** ^ undeclared identifier 327 EXIT; 328 END; 329 MsgBox2.StrMsgBox( FrameRec, VWindows.NE, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 330 "Invalid Date. Press any key." ); ***** ^ not supported yet 331 END; 332 END (*loop *); 333 334 ELSIF FieldRec.typ = FieldTypes.TypeCode( 'BOOLEAN' ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 335 LOOP 336 LastKey := KbdInput.KeyHit( KbdInput.AnyKeyNum ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 337 IF (LastKey = Key.Space) OR (LastKey = Key.Return) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 338 FieldRec.selected:= NOT FieldRec.selected; ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 339 IF width # 0 THEN 340 IF FieldRec.selected THEN ***** ^ not supported yet ***** ^ not supported yet 341 ImageRec.text[0]:=CHR(251);(* û *) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 342 ELSE 343 ImageRec.text[0]:=' ' ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 344 END; 345 END; 346 ScrnUtl1.PutFieldRec( FieldRec, FrameRec, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 347 FrameRec^.CurrentField ); ***** ^ not supported yet ***** ^ not supported yet 348 ScrnUtl1.PutFieldImageRec( ImageRec, FrameRec, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 349 FrameRec^.CurrentField ); ***** ^ not supported yet ***** ^ not supported yet 350 FramePainter.RedrawField(FrameRec,FrameRec^.CurrentField,TRUE); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 351 END; 352 TheKeyHandler( FrameRec, LastKey, LocalNextFrame ); ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 353 IF BigSets.InSet(FieldExitKeySet, LastKey) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 354 EXIT; 355 END; 356 END (*loop *); 357 358 ELSIF FieldRec.typ = FieldTypes.TypeCode( 'EDITOR' ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 359 ScrnUtl1.GetEdRec( FrameRec, FrameRec^.CurrentField, TheList, EdRec ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 360 EdRec.overwriting := NOT InsertMode; ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier 361 VEditor.TheEditor( TheList, EdRec ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 362 ScrnUtl1.PutEdRec( FrameRec, FrameRec^.CurrentField, TheList, EdRec ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 363 M2Strings.Assign( EdRec.NextFrame, NextFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 364 InsertMode := NOT EdRec.overwriting; ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 365 LastKey := EdRec.EdLastKey; ***** ^ not supported yet ***** ^ not supported yet 366 RETURN; 367 368 ELSE 369 ErrorManager.WARN( 'Unexpected field type entered' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 370 END; 371 372 Hash.Compute( ImageRec.text, Check1, Check2, Check3 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 373 IF (ChangeCheck1 # Check1) OR (ChangeCheck2 # Check2) 374 OR (ChangeCheck3 # Check3) THEN 375 FieldRec.ChangeMade := TRUE; ***** ^ not supported yet ***** ^ not supported yet 376 END; 377 ScrnUtl1.PutFieldRec( FieldRec, FrameRec, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 378 FrameRec^.CurrentField ); ***** ^ not supported yet ***** ^ not supported yet 379 380 M2Strings.Assign( LocalNextFrame, NextFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 381 END DefaultFieldHandler; ***** ^ not supported yet 382 383 384 PROCEDURE DoFunctions( FrameRec : ScrnTypes.DisplayFrame; VAR LastKey: ***** ^ not supported yet 385 CARDINAL ) : INTEGER; 386 VAR 387 NextFrame: ScrnTypes.AFrameName; ***** ^ not supported yet 388 tmpint: INTEGER; 389 BEGIN 390 NextFrame := ''; ***** ^ not supported yet 391 DefaultKeyHandler( FrameRec, LastKey, NextFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 392 IF PosUtils.Equal( NextFrame, ScrnTypes.ContinueInput ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 393 tmpint := ContinueCode; ***** ^ undeclared identifier 394 ELSIF NOT StrConv.StrToInteger( NextFrame, 0, tmpint ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 395 ErrorManager.WARN( OldFunction ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 396 END; 397 RETURN tmpint; 398 END DoFunctions; ***** ^ not supported yet 399 400 401 PROCEDURE DoFieldInput( FrameRec : ScrnTypes.DisplayFrame; col1, row1: ***** ^ not supported yet 402 CARDINAL; VAR LastKey : CARDINAL ) : INTEGER; 403 VAR 404 NextFrame: ScrnTypes.AFrameName; ***** ^ not supported yet 405 tmpint: INTEGER; 406 BEGIN 407 NextFrame := ''; ***** ^ not supported yet 408 DefaultFieldHandler( FrameRec, col1, row1, ***** ^ not supported yet ***** ^ not supported yet 409 LastKey, NextFrame ); ***** ^ not supported yet 410 IF PosUtils.Equal( NextFrame, ScrnTypes.ContinueInput ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 411 tmpint := ContinueCode; ***** ^ undeclared identifier 412 ELSIF NOT StrConv.StrToInteger( NextFrame, 0, tmpint ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 413 ErrorManager.WARN( OldFunction ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 414 END; 415 RETURN tmpint; 416 END DoFieldInput; ***** ^ not supported yet 417 418 (* 419 PROCEDURE OldKeyHandler( FrameRec : ScrnTypes.DisplayFrame; VAR 420 LastKey: CARDINAL; VAR NextFrame: ScrnTypes.AFrameName ); 421 (*If you want to continue using procedures that you assigned 422 to the Release 1.4 version of TheFunctProc, assign this 423 procedure to TheKeyHandler.*) 424 VAR 425 tmpint: ScrnTypes.FrameKey; 426 BEGIN 427 tmpint := TheFunctProc( FrameRec, LastKey ); 428 IF tmpint = ContinueCode THEN 429 StrEdit.AssignStr( ScrnTypes.ContinueInput, NextFrame ); 430 ELSE 431 StrConv.IntegerToStr( tmpint, 0, NextFrame ); 432 END; 433 END OldKeyHandler; 434 435 PROCEDURE OldFieldHandler( FrameRec : ScrnTypes.DisplayFrame; 436 col1, row1: CARDINAL; VAR LastKey : CARDINAL; VAR 437 NextFrame: ScrnTypes.AFrameName ); 438 (*If you want to continue using procedures that you assigned 439 to the Release 1.4 version of TheFieldProc, assign this 440 procedure to TheFieldHandler.*) 441 VAR 442 tmpint: ScrnTypes.FrameKey; 443 BEGIN 444 tmpint := TheFieldProc( FrameRec, col1, row1, LastKey ); 445 IF tmpint = ContinueCode THEN 446 StrEdit.AssignStr( ScrnTypes.ContinueInput, NextFrame ); 447 ELSE 448 StrConv.IntegerToStr( tmpint, 0, NextFrame ); 449 END; 450 END OldFieldHandler; 451 *) 452 453 PROCEDURE Init(); 454 BEGIN 455 IF Initialized THEN 456 RETURN; 457 ELSE 458 Initialized := TRUE; 459 END; 460 (*EntryDiag: 461 Diagnostics.Init(); 462 :EntryDiag*) 463 464 BigSets.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 465 ByteFiddler.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 466 ControlUtils.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 467 DateFunctions.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 468 Editor.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 469 ErrorManager.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 470 FieldTypes.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 471 FramePainter.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 472 GenLists.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 473 Hash.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 474 InputManager.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 475 KbdInput.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 476 Key.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 477 ListUtils.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 478 LowLevel.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 479 M2Strings.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 480 MsgBox2.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 481 Numbers.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 482 NumInput.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 483 NumTypes.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 484 PosUtils.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 485 ScrnTypes.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 486 ScrnUtl1.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 487 StrConv.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 488 StrEdit.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 489 StrInput.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 490 VEditor.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 491 VStorage.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 492 VWindows.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 493 494 (*EntryDiag: 495 Diagnostics.diagS( 'Entering UserOps', '' ); 496 :EntryDiag*) 497 498 VEditor.TheEditor := Editor.DefaultEditor; ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 499 Exiting := FALSE; ***** ^ undeclared identifier 500 InsertMode := FALSE; ***** ^ undeclared identifier 501 502 DoPrompting := TRUE; ***** ^ undeclared identifier 503 (* whether or not to use prompts *) 504 PromptRow := VWindows.EndRow(VWindows.CurrentWindow) - 1; ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 505 PromptCol := 2; ***** ^ undeclared identifier 506 (* the screen row and column to show prompts if they are used *) 507 PromptLength := VWindows.EndCol(VWindows.CurrentWindow) - 2; ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 508 (* the maximum length of prompts used. *) 509 510 TheKeyHandler := DefaultKeyHandler; ***** ^ undeclared identifier ***** ^ not supported yet 511 TheFieldHandler := DefaultFieldHandler; ***** ^ undeclared identifier ***** ^ not supported yet 512 (* The routine that processes function keys in 513 ControlFrame; see OldKeyHandler and OldFieldHandler, 514 above, if you are having problems with upgrading 1.4 515 code. *) 516 517 TheFieldProc := DoFieldInput; ***** ^ undeclared identifier ***** ^ not supported yet 518 TheFunctProc := DoFunctions; ***** ^ undeclared identifier ***** ^ not supported yet 519 520 (* Now, define valid keys for function, screen actions, 521 and string fields *) 522 523 BigSets.InitSet( FunctKeySet ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier 524 BigSets.AppendSet( FunctKeySet, "{27, 315, 316, 317, 324}" ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 525 (* extra keys we define as valid: ESC, F1, F2, F9, F10 *) 526 527 BigSets.InitSet( ScreenKeySet ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier 528 (* These are the keys that are legal when the pointer is 529 not in an input field -- i.e., when it's in a choice 530 field or goto field. ScreenInput.ControlFrame adds to 531 it the FunctKeySet and the selection characters for each 532 frame. *) 533 BigSets.AppendSet( ScreenKeySet, ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier 534 "{13, 9, 271, 328, 336, 329, 331, 333, 337, 374, 388}" ); ***** ^ not supported yet 535 (* CR, TAB, BTB, UARW, DARW, PGUP, RARW, LARW, PGDN, CtrlPgDn, CtrlPgUp *) 536 FieldExitKeySet := ScreenKeySet; ***** ^ undeclared identifier ***** ^ undeclared identifier 537 BigSets.AppendSet( FieldExitKeySet, "{27, 317, 324}" ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 538 539 BigSets.InitSet( StringKeySet ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier 540 BigSets.AppendSet( StringKeySet, "{8, ' '..'~', 128..175, 224..253}" ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 541 BigSets.AppendSet( StringKeySet, ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier 542 "{274, 288, 338, 339, 327, 335, 371, 372}" ); ***** ^ not supported yet 543 (* regular ASCII characters, foreign language characters, 544 math characters, backspace, AltE, AltD, Ins, Del, 545 Home, End, CTL arrows *) 546 547 HelpKey := Key.F1; ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 548 ExitKey := Key.F2; ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 549 TimeKey := Key.F3; ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 550 SubmitKey := Key.F10; ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 551 BackupKey := Key.Escape; ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 552 553 (*EntryDiag: 554 Diagnostics.diagS( 'Exiting UserOps', '' ); 555 :EntryDiag*) 556 557 END Init; ***** ^ not supported yet 558 559 560 BEGIN 561 Initialized := FALSE; 562 Init(); ***** ^ not supported yet ***** ^ not supported yet 563 END UserOps. ***** ^ not supported yet 716 errors