[Gambas-user] [Gambas Bug Tracker] Bug #903: Bash-like "source" command for gbs3
bugtracker at ...3416...
bugtracker at ...3416...
Mon Mar 21 10:33:57 CET 2016
http://gambaswiki.org/bugtracker/edit?object=BUG.903&from=L21haW4-
Comment #4 by Fabien BODARD:
OUPS ... INCLUDE NOT IMPORT !!!
So to create a reusable class you have to define it in the imported file for example.
===============MyClassFile.gbs============
CLASS MyClass
Static Public Function OpenDB(dbname as string)
End
END CLASS
========================
==========myscript.gbs==========
INCLUDE "MyClassFile.gbs"
MyClass.OpenDB("mydb")
========================
More information about the User
mailing list