Listing: 1 IMPLEMENTATION MODULE Scrn2Ndx; 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/scrn2ndx.mov 1.5 10 Mar 1991 15:32:02 coleb $ 12 * 13 *) 14 15 16 IMPORT ControlUtils; 17 IMPORT GenLists; 18 IMPORT LowLevel; 19 IMPORT M2Strings; 20 IMPORT NdxBones; 21 IMPORT NdxFiles; 22 IMPORT NdxTypes; 23 IMPORT ScrnTypes; 24 IMPORT ScrnUtl1; 25 IMPORT StrEdit; 26 IMPORT SYSTEM; 27 28 VAR 29 Initialized : BOOLEAN; 30 31 PROCEDURE Init(); 32 BEGIN 33 IF Initialized THEN 34 RETURN; 35 ELSE 36 Initialized := TRUE; 37 END; 38 ControlUtils.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 39 GenLists.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 40 LowLevel.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 41 M2Strings.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 42 NdxBones.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 43 NdxFiles.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 44 NdxTypes.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 45 ScrnTypes.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 46 ScrnUtl1.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 47 StrEdit.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 48 END Init; ***** ^ not supported yet 49 50 PROCEDURE PutScrRec( VAR NdxFile: NdxTypes.NdxFileType; VAR ***** ^ not supported yet 51 TheFrame: ScrnTypes.DisplayFrame; VAR RecName: ARRAY OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 52 KeyField: ARRAY OF CHAR): BOOLEAN; ***** ^ not supported yet 53 (* Puts current screen data in out as a record. If RecName is 54 not null, it contains the record name to use. If RecName is 55 null, KeyField contains the name of the field on the screen 56 to use as the Record Name. RecName will always return the 57 record name used. *) 58 VAR 59 FoundAny: BOOLEAN; 60 FileStr: ARRAY [0..255] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 61 TmpList, TmpList2: GenLists.GenList; ***** ^ not supported yet 62 FieldCount: CARDINAL; 63 FieldRec: ScrnTypes.InputFieldRecord; ***** ^ not supported yet 64 ImageRec: ScrnTypes.ImageElement; ***** ^ not supported yet 65 66 BEGIN 67 FoundAny := FALSE; 68 IF M2Strings.Length( RecName) = 0 THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 69 (* read record name from field named in KeyField *) 70 ControlUtils.ReadInput( TheFrame, RecName, KeyField); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 71 END; 72 StrEdit.CrunchBlanks( RecName ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 73 FieldCount := 1; 74 REPEAT 75 (* flip through the named fields on screen and put 76 their values in the record if they are in the 77 structure *) 78 ScrnUtl1.GetFieldRec( TheFrame, FieldCount, FieldRec ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 79 ScrnUtl1.GetImageRec( TheFrame, FieldRec.ImageNum, ImageRec ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 80 IF M2Strings.Length( FieldRec.fnam) # 0 THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 81 (* for each named field *) 82 IF FieldRec.typ # ScrnTypes.GroupMember THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 83 (* for any field except a group *) 84 IF FieldRec.typ = ScrnTypes.EditorCode THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 85 (*We store editor fields as sublists.*) 86 IF ScrnUtl1.ListFromEdField( TheFrame, FieldCount, TmpList ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 87 GenLists.CopyList( TmpList, TmpList2 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 88 FoundAny := NdxFiles.PutField( NdxFile, RecName, FieldRec.fnam, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 89 GenLists.ListCode, TmpList2) OR FoundAny; ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 90 END; 91 ELSE 92 StrEdit.CutTrailingChars( ' ', ImageRec.text ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 93 FoundAny := NdxFiles.PutField( NdxFile, RecName, FieldRec.fnam, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 94 GenLists.StrCode, ImageRec.text ) OR FoundAny; ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 95 END; 96 ELSIF FieldRec.selected THEN ***** ^ not supported yet ***** ^ not supported yet 97 (* for selected members of a group put a ONE *) 98 FoundAny := NdxFiles.PutField( NdxFile, RecName, FieldRec.fnam, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 99 GenLists.StrCode, '1') OR FoundAny; ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 100 ELSE 101 (* for non-selected members of a group put a NULL *) 102 FoundAny := NdxFiles.PutField( NdxFile, RecName, FieldRec.fnam, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 103 GenLists.StrCode, '') OR FoundAny; ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 104 END; 105 END; 106 INC( FieldCount ); ***** ^ undeclared identifier ***** ^ not supported yet 107 UNTIL FieldCount > ScrnUtl1.FieldListTotal( TheFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 108 RETURN FoundAny; 109 END PutScrRec; ***** ^ not supported yet 110 111 PROCEDURE FillScr( VAR NdxFile: NdxTypes.NdxFileType; VAR ***** ^ not supported yet 112 TheFrame: ScrnTypes.DisplayFrame; VAR RecName: ARRAY OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 113 KeyField: ARRAY OF CHAR): BOOLEAN; ***** ^ not supported yet 114 (* Fills the current screen with the data from the record named 115 in RecName if RecName is not null. If RecName is null, KeyField 116 contains the name of the field on the screen to use as the 117 Record Name. RecName will always return the record name used.*) 118 VAR 119 FoundAny: BOOLEAN; 120 FileStr, BlankStr: ARRAY [0..255] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 121 FileLeng, ScrLeng, TheType: CARDINAL; 122 TmpList, TmpList2: GenLists.GenList; ***** ^ not supported yet 123 FieldCount: CARDINAL; 124 FieldRec: ScrnTypes.InputFieldRecord; ***** ^ not supported yet 125 ImageRec: ScrnTypes.ImageElement; ***** ^ not supported yet 126 127 BEGIN 128 LowLevel.Fill( SYSTEM.ADR( BlankStr), HIGH(BlankStr) + 1, ' '); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 129 FoundAny := FALSE; 130 IF M2Strings.Length( RecName) = 0 THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 131 (* read record name from field named in KeyField *) 132 ControlUtils.ReadInput( TheFrame, RecName, KeyField); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 133 END; 134 StrEdit.CrunchBlanks( RecName ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 135 FieldCount := 1; 136 REPEAT 137 (* flip through the named fields on screen and extract 138 their value from the file if they exist there *) 139 ScrnUtl1.GetFieldRec( TheFrame, FieldCount, FieldRec ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 140 ScrnUtl1.GetImageRec( TheFrame, FieldRec.ImageNum, ImageRec ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 141 IF (M2Strings.Length( FieldRec.fnam) # 0) AND ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 142 NdxFiles.GetField( NdxFile, RecName, FieldRec.fnam, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 143 TheType, FileStr) THEN ***** ^ not supported yet 144 (* for each named field we can get from the file *) 145 IF FieldRec.typ # ScrnTypes.GroupMember THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 146 (* for any field except a group *) 147 FoundAny := TRUE; 148 IF TheType = GenLists.StrCode THEN ***** ^ not supported yet ***** ^ not supported yet 149 FileLeng := M2Strings.Length( FileStr); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 150 ScrLeng := M2Strings.Length( ImageRec.text); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 151 IF FileLeng < ScrLeng THEN 152 (*We need to pad out stored string with blanks to 153 match length of screen field.*) 154 StrEdit.SetLength( BlankStr, ScrLeng - FileLeng); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 155 StrEdit.Append( FileStr, BlankStr); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 156 END; 157 IF FieldRec.typ # ScrnTypes.EditorCode THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 158 StrEdit.AssignStr( FileStr, ImageRec.text); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 159 ELSE 160 GenLists.NewList( TmpList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 161 GenLists.ListInsert( FileStr, GenLists.StrCode, TmpList, 1 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 162 IF NOT ScrnUtl1.ListToEdField( TmpList, TheFrame, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 163 FieldCount ) THEN ***** ^ not supported yet 164 HALT(); ***** ^ undeclared identifier ***** ^ not supported yet 165 END; 166 END; 167 ELSIF TheType = GenLists.ListCode THEN ***** ^ not supported yet ***** ^ not supported yet 168 IF FieldRec.typ = ScrnTypes.EditorCode THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 169 (*Make sure it's an editor field before we fill 170 it with a list.*) 171 IF NdxFiles.GetField( NdxFile, RecName, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 172 FieldRec.fnam, TheType, TmpList ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 173 GenLists.CopyList( TmpList, TmpList2 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 174 IF NOT ScrnUtl1.ListToEdField( TmpList2, TheFrame, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 175 FieldCount ) THEN ***** ^ not supported yet 176 HALT(); ***** ^ undeclared identifier ***** ^ not supported yet 177 END; 178 END; 179 END; 180 (*You could add additional data conversion operations 181 here.*) 182 END; 183 ELSE 184 (* for members of a group *) 185 FoundAny := TRUE; 186 FieldRec.selected := M2Strings.Length( FileStr) # 0; ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 187 (* this simple logic assumes that the groups are the 188 same on input and display screens *) 189 END; 190 ScrnUtl1.PutFieldImageRec( ImageRec, TheFrame, FieldCount ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 191 ScrnUtl1.PutFieldRec( FieldRec, TheFrame, FieldCount ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 192 END; 193 INC( FieldCount ); ***** ^ undeclared identifier ***** ^ not supported yet 194 UNTIL FieldCount > ScrnUtl1.FieldListTotal( TheFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 195 RETURN FoundAny; 196 END FillScr; ***** ^ not supported yet 197 198 199 PROCEDURE PutScrFast( VAR NdxFile: NdxTypes.NdxFileType; VAR ***** ^ not supported yet 200 TheFrame: ScrnTypes.DisplayFrame; VAR RecName: ARRAY OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 201 KeyField: ARRAY OF CHAR): BOOLEAN; ***** ^ not supported yet 202 (* Works like PutScrRec except that it requires an exact match 203 between all named fields in the screen and the file record *) 204 VAR 205 Selctd: BOOLEAN; 206 FileStr: ARRAY [0..255] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 207 TmpList, TmpList2: GenLists.GenList; ***** ^ not supported yet 208 FileCntr, FileStructLen: CARDINAL; 209 FieldCount: CARDINAL; 210 FieldRec: ScrnTypes.InputFieldRecord; ***** ^ not supported yet 211 ImageRec: ScrnTypes.ImageElement; ***** ^ not supported yet 212 213 BEGIN 214 IF M2Strings.Length( RecName) = 0 THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 215 (* read record name from field named in KeyField *) 216 ControlUtils.ReadInput( TheFrame, RecName, KeyField); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 217 END; 218 StrEdit.CrunchBlanks( RecName ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 219 IF NOT NdxBones.InitBuffer( NdxFile, RecName) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 220 (* Loads file buffer with desired record; false result 221 probably indicates we're creating a new record, but 222 could actually indicate an error. We trust that we 223 will catch an error below. *) 224 END; 225 FieldCount := 1; 226 FileCntr := 0; 227 (* used to count fields written to record *) 228 FileStructLen := GenLists.ListLength( NdxFile^.ListBuf); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 229 REPEAT 230 (* flip through the named fields on screen and store 231 each in the record *) 232 ScrnUtl1.GetFieldRec( TheFrame, FieldCount, FieldRec ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 233 ScrnUtl1.GetImageRec( TheFrame, FieldRec.ImageNum, ImageRec ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 234 IF M2Strings.Length( FieldRec.fnam) # 0 THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 235 (* for each named field *) 236 INC( FileCntr); ***** ^ undeclared identifier ***** ^ not supported yet 237 (* go to next field in file *) 238 IF FileCntr > FileStructLen THEN 239 RETURN FALSE; 240 END; 241 IF FieldRec.typ # ScrnTypes.GroupMember THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 242 (* for any field except a group *) 243 IF FieldRec.typ = ScrnTypes.EditorCode THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 244 (*We store editor fields as sublists.*) 245 IF ScrnUtl1.ListFromEdField( TheFrame, FieldCount, TmpList ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 246 GenLists.CopyList( TmpList, TmpList2 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 247 GenLists.ListReplace( TmpList2, GenLists.ListCode, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 248 NdxFile^.ListBuf, FileCntr); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 249 END; 250 ELSE 251 StrEdit.CutTrailingChars( ' ', ImageRec.text ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 252 GenLists.ListReplace( ImageRec.text, GenLists.StrCode, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 253 NdxFile^.ListBuf, FileCntr); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 254 END; 255 ELSIF FieldRec.selected THEN ***** ^ not supported yet ***** ^ not supported yet 256 (* for selected members of a group put a ONE *) 257 GenLists.ListReplace( '1', GenLists.StrCode, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 258 NdxFile^.ListBuf, FileCntr); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 259 ELSE 260 (* for non-selected members of a group put a NULL *) 261 GenLists.ListReplace( '', GenLists.StrCode, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 262 NdxFile^.ListBuf, FileCntr); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 263 END; 264 END; 265 INC( FieldCount ); ***** ^ undeclared identifier ***** ^ not supported yet 266 UNTIL FieldCount > ScrnUtl1.FieldListTotal( TheFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 267 RETURN TRUE; 268 END PutScrFast; ***** ^ not supported yet 269 270 271 PROCEDURE FillScrFast( VAR NdxFile: NdxTypes.NdxFileType; VAR ***** ^ not supported yet 272 TheFrame: ScrnTypes.DisplayFrame; VAR RecName: ARRAY OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 273 KeyField: ARRAY OF CHAR): BOOLEAN; ***** ^ not supported yet 274 (* Fills the current screen with the data from a record. Works 275 like FillScr except that it requires an exact match between all 276 named fields in the screen and the fields in the file record *) 277 VAR 278 Selctd : BOOLEAN; 279 FileStr, BlankStr: ARRAY [0..255] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 280 FileLeng, ScrLeng, TheType, FileCntr, 281 FileStructLen: CARDINAL; 282 TmpList, TmpList2: GenLists.GenList; ***** ^ not supported yet 283 FieldCount: CARDINAL; 284 FieldRec: ScrnTypes.InputFieldRecord; ***** ^ not supported yet 285 ImageRec: ScrnTypes.ImageElement; ***** ^ not supported yet 286 287 BEGIN 288 LowLevel.Fill( SYSTEM.ADR( BlankStr), HIGH(BlankStr) + 1, ' '); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 289 IF M2Strings.Length( RecName) = 0 THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 290 (* read record name from field named in KeyField *) 291 ControlUtils.ReadInput( TheFrame, RecName, KeyField); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 292 END; 293 StrEdit.CrunchBlanks( RecName ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 294 IF NOT NdxBones.InitBuffer( NdxFile, RecName) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 295 (* loads file buffer with desired record *) 296 RETURN FALSE; 297 END; 298 FieldCount := 1; 299 FileCntr := 0; 300 FileStructLen := GenLists.ListLength( NdxFile^.ListBuf); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 301 REPEAT 302 (* flip through the named fields on screen and, for 303 each, extract the next field in the file record *) 304 ScrnUtl1.GetFieldRec( TheFrame, FieldCount, FieldRec ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 305 ScrnUtl1.GetImageRec( TheFrame, FieldRec.ImageNum, ImageRec ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 306 IF M2Strings.Length( FieldRec.fnam) # 0 THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 307 (* for each named field *) 308 INC( FileCntr); ***** ^ undeclared identifier ***** ^ not supported yet 309 (* go to next field in file *) 310 IF FileCntr > FileStructLen THEN 311 RETURN FALSE; 312 END; 313 GenLists.GetElmt( NdxFile^.ListBuf, FileCntr, FileStr, TheType); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 314 (*Read file value.*) 315 IF FieldRec.typ # ScrnTypes.GroupMember THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 316 (* for any field except a group *) 317 IF TheType = GenLists.StrCode THEN ***** ^ not supported yet ***** ^ not supported yet 318 FileLeng := M2Strings.Length( FileStr); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 319 ScrLeng := M2Strings.Length( ImageRec.text); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 320 IF FileLeng < ScrLeng THEN 321 (*We need to pad out stored string with blanks to 322 match length of screen field.*) 323 StrEdit.SetLength( BlankStr, ScrLeng - FileLeng); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 324 StrEdit.Append( FileStr, BlankStr); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 325 END; 326 IF FieldRec.typ # ScrnTypes.EditorCode THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 327 StrEdit.AssignStr( FileStr, ImageRec.text); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 328 ELSE 329 GenLists.NewList( TmpList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 330 GenLists.ListInsert( FileStr, GenLists.StrCode, TmpList, 1 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 331 IF NOT ScrnUtl1.ListToEdField( TmpList, TheFrame, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 332 FieldCount ) THEN ***** ^ not supported yet 333 HALT(); ***** ^ undeclared identifier ***** ^ not supported yet 334 END; 335 END; 336 ELSIF TheType = GenLists.ListCode THEN ***** ^ not supported yet ***** ^ not supported yet 337 IF FieldRec.typ = ScrnTypes.EditorCode THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 338 (*Make sure it's an editor field before we fill 339 it with a list.*) 340 GenLists.GetChildList( NdxFile^.ListBuf, FileCntr, TmpList); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 341 GenLists.CopyList( TmpList, TmpList2 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 342 IF NOT ScrnUtl1.ListToEdField( TmpList2, TheFrame, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 343 FieldCount ) THEN ***** ^ not supported yet 344 HALT(); ***** ^ undeclared identifier ***** ^ not supported yet 345 END; 346 END; 347 (*You could add additional data conversion operations 348 here.*) 349 END; 350 ELSE 351 (* for members of a group *) 352 FieldRec.selected := M2Strings.Length( FileStr) # 0; ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 353 (* this simple logic assumes that the groups are the 354 same on input and display screens *) 355 END; 356 ScrnUtl1.PutFieldImageRec( ImageRec, TheFrame, FieldCount ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 357 ScrnUtl1.PutFieldRec( FieldRec, TheFrame, FieldCount ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 358 END; 359 INC( FieldCount ); ***** ^ undeclared identifier ***** ^ not supported yet 360 UNTIL FieldCount > ScrnUtl1.FieldListTotal( TheFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 361 RETURN TRUE; 362 END FillScrFast; ***** ^ not supported yet 363 364 365 BEGIN 366 Initialized := FALSE; 367 Init(); ***** ^ not supported yet ***** ^ not supported yet 368 END Scrn2Ndx. ***** ^ not supported yet 525 errors