Can you not just make a Startup.module then have it load the class?
' Gambas module file
Public Sub Main()
Class.Load("MyStartingClass")
End
Or...
' Gambas module file
Public Sub Main()
MyStartingClass.Run
End
' Gambas module file
Public Sub Main()
Class.Load("MyStartingClass")
End
Or...
' Gambas module file
Public Sub Main()
MyStartingClass.Run
End
Static Public Sub Main()
End
okBruceSteers wrote: ↑Monday 11th July 2022 11:48am Benoit provided the simple answer on the mailing list......
' Gambas class file
Create Static
Static $myGlobalInteger As Integer
Static Public Sub Main()
$myGlobalInteger = 5
End
But i could well be wrong about that.Perhaps Reread the first bit of the Create Static help till yours eyes bleed (and then tell me what it means )BruceSteers wrote: ↑Monday 11th July 2022 3:01pm I'm guessing the whole class should then have to be static too?
and any global variables referenced from Main() would need to be declared as static too.But i could well be wrong about that.
' Gambas class file Create Static Static $myGlobalInteger As Integer Static Public Sub Main() $myGlobalInteger = 5 End
do much other than everything that you need done before your real main processing begins....BruceSteers wrote: ↑Monday 11th July 2022 3:07pm It makes more sense for your startup class/module to not really do much except initiate/run your other class files like vuott says.