
Property Let, Property Get
hi Root,
I'm having a little trouble understanding your question.
You can't create collections in script, so your collection must be coming
from somewhere else. (I assume it's either one of the collections built
into the language or instantiated via a createobject method).
If it's coming from somewhere else, you could just pass the collection back
from the class to your script, and then use normal "collection syntax",
i.e.,:
Set myCollection = oMyClass.GetCollection()
GetValue = myCollection("key") or, myCollection("key") = SetValue
cheers, jw
Quote:
> Is there a way to use the Property Let statement in a class definition to
> assign values in the following manner.
> objMyClass.aProperty("collectionIdentifier") = aValue
> Public Property Let aProperty(ByVal arg1, ByVal arg2)
> objMyCollection(arg1) = arg2
> End Property ?
> can the value be retrieved using Property Get
> aValue = objMyClass.aProperty("collectionIdentifier")
> Public Property Get aProperty(ByVal arg1)
> aProperty = objMyCollection(arg1)
> End Property ??
> the only other options I can think of is to expose objMyCollection as a
> property itself, or make it a public member.
> Also when are Microsoft going to implement inheritance and polymorphism
into
> VBScript classes? - Perhaps never, now that .NET is imminent.
> thanks
> root