[Gambas-user] Bug with process events?
Benoît Minisini
gambas at ...1...
Tue Dec 10 02:46:54 CET 2013
Le 08/12/2013 18:06, Jussi Lahtinen a écrit :
> See attached project. If event is raised something corrupts/event is missed.
>
>
> Jussi
>
>
EXEC ... TO (and SHELL ... TO) calls the event loop, so by using it
inside the "Something" event handler, you are calling the event loop
recursively, and an inner Process_Read is called while the outer is not
yet terminated.
Just put a breakpoint on your "What went wrong" message and look at the
stack backtrace.
The first character is not yet added to Main.sWord, while all the inner
Process_Read are called as the event is raised before, so that first
character is missing when reaching the end test.
Just put the Raise Something after adding the character to Main.sWord,
for example.
I can't help you more without knowing exactly what you want to achieve.
--
Benoît Minisini
More information about the User
mailing list