[Gambas-user] How to use MessageView when closing a form?

Benoît Minisini g4mba5 at gmail.com
Fri Aug 27 00:34:06 CEST 2021


Le 26/08/2021 à 22:25, Bruce Steers a écrit :
> I vision some awesome new command like
> Trigger
> Or
> Call
> For example
> 
> Public Sub Form_MouseUp()
> 
>    Call MyFuncion()
> 
> End
> 
> Function is run freely and event handler exits.
> 
> I've had many a condition where I wanted out of the event handler, it 
> usually involves event handler just starting a Timer that runs the commands.
> 
> Something built it would be cool 😎
> 
> Respects
> BruceS
> 

I don't know what you are actually in mind.

I just can tell that when I need to run some code later, I use a timer 
object and its Trigger() method. That way the code is run at the next 
event loop.

But it requires a lot of lines of codes, so maybe we can imagine 
something like:

   Do SomeFunction() Next

that would run 'SomeFunction' at the next event loop.

The syntax is not terrible, but introducing new keywords in the language 
may break existing code.

Another point: as there is no closure in Gambas, the function cannot 
take any arguments.

Regards,

-- 
Benoît Minisini


More information about the User mailing list