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

Bruce Steers bsteers4 at gmail.com
Fri Aug 27 01:11:32 CEST 2021


I mean something like how Shell/Exec can use Wait or not. Something like
that but for any Sub/Function/etc like Try can prefix anything (almost)

A function prefix (Do sounds good, Run would make sense) that would run the
function/Sub asynchronous, so the event handler would just trigger the
comnand in another process/timer and exit.

That's how I exit my event handlers quickly. The event handler triggers a
timer and ends, the timer runs the commands.

Hope that makes sense.
Wishing well
BruceS

On Thu, 26 Aug 2021, 23:35 Benoît Minisini, <g4mba5 at gmail.com> wrote:

> 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
>

>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210827/936e271a/attachment.htm>


More information about the User mailing list