[Gambas-user] Project crash due Textarea selection
Bruce Steers
bsteers4 at gmail.com
Mon Oct 5 22:03:21 CEST 2020
My 2 bits worth.
I'd just use TextArea1.Text = "" instead of the .Clear and .Line method.
And I'm not at a computer to test but is the 1st line line=1 or line=0 ?
Also you could...
If TextArea1.Selected Then TextArea1.UnSelect()
Bruce S
On Mon, 5 Oct 2020, 20:27 pinglix via User, <user at lists.gambas-basic.org>
wrote:
> I send the project.
>
> It is a monitor that prints incoming messages from UDP datagrams received
> on ports 50000 and 50001.
> The rate is 1 message per second.
>
> There are 2 TextArea named TextServer and TextAudio.
>
> For each textarea every 20 messages the code makes a
>
> Textxxxxx.clear
> Textxxxxx.Line = 1
>
> to clean the area and restart from the first line.
>
> If you do rapid clicks with the mouse over a text it happens that the
> project crashes now and then.
>
> I suppose the clicks select words and lines at the same time the text is
> cleared and this makes the program to crash.
>
> Of course it is Gambas 3.15.1, I was writing the email not in front of the
> computer.
>
> Thanks
>
> > Il 05/10/2020 04:15 Benoît Minisini <g4mba5 at gmail.com> ha scritto:
> >
> >
> > Le 04/10/2020 à 22:00, pinglix via User a écrit :
> > > Hello
> > > in a project I have 2 Textarea that shows messages coming from UDP
> > > datagrams.
> > >
> > > Every 20 rows I do
> > >
> > > Textarea.clear
> > > Textarea.line = 1
> > >
> > > If I select text in the exact moment the rows are cleared, for example
> > > making rapidly left clicks on the text, the programma crashes.
> > > I don't know if this can be considered a bug.
> > >
> > > Any way to avoid this ?
> > >
> > > I have no need to select text, It makes no sense so I can disabile all
> > > mouse events on the 2 text areas but I don't know how to do It.
> > >
> > > Gambas 15.1
> > >
> > > Thank you.
> > >
> > > --
> > > Inviato da Libero Mail per Android
> > >
> > >
> > >
> > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
> > >
> >
> > Please provide a project that reproduces the bug (this is Gambas 3.15.1,
> > not Gambas 15.1 by the way).
> >
> > Thanks.
> >
> > --
> > Benoît Minisini
> >
> > ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20201005/26e45029/attachment.htm>
More information about the User
mailing list