[Gambas-user] Control GUI (Qt5) Gambas program via Standard Input

T Lee Davidson t.lee.davidson at gmail.com
Mon Feb 13 04:53:44 CET 2023


On 2/11/23 19:43, james at lixce.com wrote:
> Benoit,
> 
> Thank you, I saw in the Gambas Help that is must be declared as "static method" but perhaps that is my problem, I cannot figure out how to declare a static function.  I have tried:
> 
> Static Public Function Application_Read(stIn As String) As String
> Static Private Function Application_Read(stIn As String) As String
> Static Public Function Application_Read()  As String
> Static Private Function Application_Read() As String
> Static Function Application_Read() As String
> Static Public Function Appication_Read()
> Static Private Function Application_Read()
> Static Function Application_Read()
> 
> Along with "Sub" variations of all of those declarations with and without return values but nothing works.
> 
> I have looked through the source code of the IDE and do not see anything special in the Static Sub declarations.
> 
> I have searched the internet for how to declare a static function in Gambas to no avail and even read through Static declarations in C, C++ and Java.
> 
> Can you, or someone please show me an example of HOW to declare a "Static Function" in Gambas.
> 
> Thank you,
> J. Jordan

I also cannot get the Application_Read event handler to fire. But, the STATIC keyword *is* changing *something*. When declaring 
the Sub as Static, the application does not stop when it's window is closed. If it is not Static, the application stops normally.


-- 
Lee



More information about the User mailing list