Recent

Author Topic: ATSynEdit loadFromFile  (Read 860 times)

polpero

  • Full Member
  • ***
  • Posts: 127
ATSynEdit loadFromFile
« on: July 26, 2023, 10:29:24 pm »
Hi.

It seems that ATSynEdit.loadFromFile now requires 2 parameters?
could someone explain the TATLoadStreamOption ?
and how to use it?

thanks

AlexTP

  • Hero Member
  • *****
  • Posts: 2654
    • UVviewsoft
Re: ATSynEdit loadFromFile
« Reply #1 on: September 15, 2025, 04:11:27 pm »
I overlooked that post.
Second parameter is of set-type:
Code: Pascal  [Select][+][-]
  1.   TATLoadStreamOption = (
  2.     FromUTF8,
  3.     AllowBadCharsOfLen1,
  4.     KeepScroll
  5.     );
  6.   TATLoadStreamOptions = set of TATLoadStreamOption;  

Members:

- FromUTF8: stream must be UTF8-encoded, load it faster.
- AllowBadCharsOfLen1: ignore invalid UTF8 sequences of length=1.
- KeepScroll: restore scrolling pos in editor after file loaded.

Added these comments:
https://github.com/Alexey-T/ATSynEdit/commit/c75688dc9b1745e22612fe61eb56a8add0acb2f1
« Last Edit: September 15, 2025, 04:18:34 pm by AlexTP »

 

TinyPortal © 2005-2018