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

Bruce Steers bsteers4 at gmail.com
Fri Aug 27 03:30:49 CEST 2021


Task would also make sense if it could be used as a keyword
Process might also fit the purpose

Task SomeFunction(sWithArgs)
Process SomeFunction(sWithArgs)

RunSomeFunction(sMyArgs) With Process  ' also makes sense , as it's running
a function with it's own process

Respects
BruceS



On Fri, 27 Aug 2021 at 00:30, Jussi Lahtinen <jussi.lahtinen at gmail.com>
wrote:

> There is the Task keyword.
> http://gambaswiki.org/wiki/comp/gb/task
>
> Jussi
>
> On Fri, Aug 27, 2021 at 2:12 AM Bruce Steers <bsteers4 at gmail.com> wrote:
>
>> 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
>>>
>>
>>>
>>>
>> ----[ 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/20210827/fad6e8a5/attachment-0001.htm>


More information about the User mailing list