Category : Pascal Source Code
Archive   : SHAZAM2.ZIP
Filename : EDLOAD.PAT

 
Output of file : EDLOAD.PAT contained in archive : SHAZAM2.ZIP
UNIT: EDITORS.PAS
PROBLEM: Fatal hang when loading Desktop TEditWindows
TEST: Load Desktop file with 2+ TEditWindows, press PgDn = Fatal hang

Add the line marked with {!!}
-----------------------------
procedure TFileEditor.InitBuffer ;
begin
NewBuffer ( Pointer ( Buffer ) ) ;
BufSize := 0 ; {!!}
end.
-----------------------------
From: Juergen Schlegelmilch



------------------------------------------------------------
Delete or comment-out these lines; add "CanUndo := TRUE ;"
------------------------------------------------------------
TEditor.Store:
{ S.Write (CanUndo, SizeOf (Boolean)); } { !! comment out }
S.Write (AutoIndent, SizeOf (AutoIndent)); { !! add }
TEditor.Load:
{ S.Read (CanUndo, SizeOf (Boolean)); } { !! comment out }
S.Read (AutoIndent, SizeOf (AutoIndent)); { !! add }
CanUndo := TRUE ; { !! add }

------------------------------------------------------------
NOTES:

[X] "BufSize" messes up memory management by BUFFERS unit, when
TFileEditor is used. This is because the normal TEditor
allocates memory directly from the heap, while TFileEditor
replaces "InitBuffer" via a virtual method.

[X] "AutoIndent" should be saved.

[X] "CanUndo" is changed for two reasons:

1. If the ClipBoard is saved to a filename, "TEditor.Load"
will load the file but with the UNDO disabled.

2. If your "Desktop Save" routine fails to ignore the
ClipBoard, the resulting "Untitled" file will have its
"CanUndo" set to FALSE, resulting in the same problem as
number (1) above.

--------
COMMENTS
--------
Works properly for both TMemo and TFileEditor. Already
implemented in Al Andersen's NEWEDIT.

///////////////////////////
// Johnathan J. Stein //
// Post Office Box 346 // Comments or suggestions welcomed; please
// Perrysburg, OH 43552 // send to address(es) at left.

// (419) 666-7103 //
// CompuServe 76576,470 //
///////////////////////////


  3 Responses to “Category : Pascal Source Code
Archive   : SHAZAM2.ZIP
Filename : EDLOAD.PAT

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/