i try to program a virtual component (it is the first one) which
connects to a Server and communicates with it. I allready read the
To Program Components In Gambas an walked through all the code
located in the /comp/src directory.
The component has only three properties which should be set in the
gambas-IDE as well as by code.
Everything works fine: in the gambas ide you can place the new control
on a form and the properties where shown as they should be.
If I run the program it stops with "Not enough arguments". I think in
comes from the _init() part.
If I create a new Control in my Code:
DIM CTItmp as new CTI(Fmain),
it works, but without the default values. Can anyone explain me, what i
Here is the Code of the Control called CTI (its picture is named
cti.png). It should just print the given values. The rest of the
functionality will come later...
' Gambas class file
EVENT TELRinging(Anrufer AS String)
PROPERTY Port AS Integer
PROPERTY Server AS String
PROPERTY Nebenstelle AS Integer
PUBLIC CONST _Properties AS String =
PRIVATE INTport AS Integer
PRIVATE STRserver AS String
PRIVATE INTnebenstelle AS Integer
PUBLIC SUB _new()
STATIC PUBLIC SUB _init()
PRINT "_init() :-)"
PUBLIC SUB Connect()
PRINT "Will connect to " & STRserver
PRIVATE FUNCTION Port_Read() AS Integer
PRIVATE SUB Port_Write(Value AS Integer)
INTport = Value
PRIVATE FUNCTION Server_Read() AS String
PRIVATE SUB Server_Write(Value AS String)
STRserver = Value
PRIVATE FUNCTION Nebenstelle_Read() AS Integer
PRIVATE SUB Nebenstelle_Write(Value AS Integer)
INTnebenstelle = Value