[Pas2js] [feature request + ideas] Implementing TStream based classes (TBytesStream, TFileStream, TStringStream and so on)
Mattias Gaertner
nc-gaertnma at netcologne.de
Tue Nov 13 18:01:59 CET 2018
On Tue, 13 Nov 2018 12:21:40 -0300
silvioprog <silvioprog at gmail.com> wrote:
>[...]
> > Yes, but that is async and interactive, so has little todo with
> > SaveToFile. Correct?
>[...]
> procedure TBytesStream.SaveToFile(const AFileName: TFileName);
> assembler; asm
> [... JS code that can be written in Pascal and starts a save
> dialog...]
Existing code that uses SaveToFile expects a synced version.
Of course you can provide a async, interactive version, but then you
should give it a different name.
> Huh? Of course you still need TJSArrayBuffer for reading binary
> > data and storing large data.
> >
>
> Do you want to make it for ES6+ only? I think something like this
> could be used: {$IF
> ECMAScript>=6}TJSArrayBuffer{$ELSE}TBytes{$ENDIF}. So ugly, but it is
> ECMAScript>just to show that ES compatibility can be easily solved.
ok
Mattias
More information about the Pas2js
mailing list