start method in class
Posted
#1
(In Topic #868)
Trainee
Posted
Guru

Posted
Trainee
Posted
Guru

Posted
Guru

Use _init() or _new()
Posted
Trainee
Posted
Regular

A Module does not have and cannot raise its own Events, but it can raise Events of other Classes.paco said
Must be a class to use the Application_Error event
Exemplum:
Europaeus sum !
<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
Posted
Trainee
Posted
Trainee
My simple starting question was, how to use a class as starting-class - Gambas offers this option in it's project-tree. Is there a way?
Posted
Regular

Therefore, I believe it is not possible to start Gambas "directly" from a specific secondary Class, created by you.
I believe that the correct procedure is to create an instance of the specific secondary Class in the Main Class or in the Main Module of the application (in the startup Class or Module) and in those to invoke a routine of the specific secondary Class that you created.
Europaeus sum !
<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
Posted
Guru

Posted
Guru

Setting the "Startup class"
(but sorry you can't use a class just a module ! lol)
Posted
Guru

Posted
Regular

ok :!:BruceSteers said
Benoit provided the simple answer on the mailing list……
Europaeus sum !
<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
Posted
Guru

and any global variables referenced from Main() would need to be declared as static too.
But i could well be wrong about that.
Posted
Guru

Posted
Regular

BruceSteers said
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.
Perhaps
I have only ever had one case where I had to use that command. Don't ask, I have no idea why.
Posted
Regular

BruceSteers said
It makes more sense for your startup class/module to not really do much except initiate/run your other class files like vuott says.
do much other than everything that you need done before your real main processing begins….
Is the internet up?
Is the database server running?
Is it Friday the 13th?
etc
1 guest and 0 members have just viewed this.


