[Gambas-user] Re; Execution order

Gareth Bult gareth at ...1689...
Tue Sep 25 17:53:37 CEST 2007


gb.db.form (!)

When I press F8 on my version, this is the code that runs first!

PUBLIC SUB _new()
  
  $hCtrl = NEW ComboBox(ME) AS "ComboBox" <------------ ****
  ME._AutoResize = TRUE
  '$hCtrl.ReadOnly = TRUE
  
END

--
Managing Director, Encryptec Limited
Tel: 0845 25 77033, Mob: 07891 389657
Email: gareth at ...1689... 
Statements made are at all times subject to Encryptec's Terms and Conditions of Business, which are available upon request.

----- Original Message -----
From: "Benoit Minisini" <gambas at ...1...>
To: "mailing list for gambas users" <gambas-user at lists.sourceforge.net>
Sent: Tuesday, September 25, 2007 4:48:14 PM (GMT) Europe/London
Subject: Re: [Gambas-user] Re; Execution order

On mardi 25 septembre 2007, Gareth Bult wrote:
> Hi,
>
> I have a copy of gb.db.form that I'm working on as a project.
>
> For some reason when I run the project, the first line of code it runs is
> in "DataCombo" as opposed to "Main" (the startup class).
>
> Any obvious reasons why it's not running "Main" first?
>
> .. it "was" .. all I can see that's changed is an upgrade to SVN 662 ...
>
> .. Any ideas?

Main is not the first code run by the interpreter, because when a class is 
loaded, its _init static public function is called, and all its static 
variable are initialized.

Logically no code should be run in DataCombo, as there are no static things in 
it, but you must tell me exactly which code was run so that I could 
understand the trick.

Regards,

-- 
Benoit Minisini

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Gambas-user mailing list
Gambas-user at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user





More information about the User mailing list