[Gambas-user] Texteditor html/md previewer bug

Bruce Steers bsteers4 at gmail.com
Tue Feb 6 17:07:55 CET 2024


I can reproduce a bug...

I open a project that has a Readme.md file and open the .md file to edit.
I press the Preview button to open the previewer.
I then click another window like firefox or something to bring it in front
of the IDE.
I then click the gambas IDE TextEditor behind to bring it to front again.
That's when i get a asynchronous pending event error...
see attached image.  (Note for master the line is actually 1826 not 1923)
https://gitlab.com/gambas/gambas/-/blob/master/app/src/gambas3/.src/Editor/Code/FTextEditor.class?ref_type=heads#L1826

I fix by adding "Try" ...

    If $bPreviewReady Then Try $hPreview.ExecJavascript("goto_line(" &
CStr($hEditor.Line) & ");")

But if that is a correct fix only Benoit really knows :)

Respects
BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20240206/8d43c083/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Untitled.jpg
Type: image/jpeg
Size: 86514 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20240206/8d43c083/attachment-0001.jpg>


More information about the User mailing list