[Gambas-user] VB to Gambas
Eilert
eilert-sprachen at ...221...
Thu Mar 3 10:02:28 CET 2005
Hi Charlie,
is it possible to use this with array objects? I've been trying around a
bit here, but no hope.
Two questions:
First: when I try STATIC PUBLIC like in your example, I get an error
message "ProgType is static" when trying to stuff something into the
variable. So I changed it to a simple "PUBLIC", then it was ok. Why's that?
Well, now this:
This is an example of what I tryed based on your example:
' 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 ProgType
or
STATIC Prog1 AS NEW ProgType
and in a SUB there:
Prog1.Pfad.Add("hello")
The automatic list appears, so Gambas understands this is an array
object, it offers "Name", "Pfad", .Add etc., everything ok so far, but
when I run it I get this "Null object" error.
Why?
I tried to declare the array at different places and in different ways,
but there is always the same error.
Rolf
More information about the User
mailing list