Click to See Complete Forum and Search --> : objects in array


SubZane
05-23-2003, 10:06 AM
I have this simple class:

class foo
public color

function getcolor()
getcolor = color
end function

function setcolor(col)
color = col
end function
end class

and I wish to have several objects like these in an array

Dim ofoo
Set ofoo = new foo

with ofoo
.setcolor "blue"
end with

Dim afoos
afoos(0) = ofoo


but this gives me an error "Type mismatch "
is it at all possible in some way?

SubZane
05-23-2003, 10:29 AM
hmm I forgot to initialize the array maybe

SubZane
05-25-2003, 06:22 AM
yep, now it works :)