[Gambas-user] VB to Gambas

Eilert eilert-sprachen at ...221...
Thu Mar 3 12:43:22 CET 2005


Hi Ron,

Thank you for that tip, now I got it running :-)

> ----------------------
> ' Gambas class file ProgType
> PUBLIC Name AS String
> PUBLIC Pfad AS String
> PUBLIC Verzeichnis AS String
> --------------------
> 
> 'This is in another class (form)
> PUBLIC Prog1 AS NEW object[] ' objects of ProgType
>  or
> STATIC PUBLIC Prog1 AS NEW object[] ' objects of ProgType
> 
> I belive STATIC should be the correct one, try and error ;)

Well, I used PRIVATE, and it runs that way.

> 
> and in a SUB there:
> PUBLIC SUB onButton1Click()
> 
> 	DIM progdata AS NEW ProgType
> 	progdata.Name= "the_name"
> 	progdata.Pfad = "The_Pfad"
> 	progdata.Verzeichnis = "The_Ordner"
> 
> 
> 
> 	Prog1.Add(progdata) 'Prog1 is the array of progdata's
> END

Reading a string value from number 3 is

	x = Prog1[3].Pfad

for example, right? The automatic list doesn't appear here, so you have 
to insert the variable names from memory. But it was running here this 
way... :-)

Rolf





More information about the User mailing list