View Single Post
Old 06-22-2009   #2 (permalink)
mayayana


 
 

Re: Is it possible to use Object.Object notation in vbscript ?

Quote:

> If I create two or more classes, is it possible to use,
> X = Object.Object.propperty ?
>
> Such as Word application object accessing the Document object property
>
Yes. For instance window.event.srcElement
with the IE DOM. But you seem to be mixing
up classes and objects. Maybe you've got a .Net
background? I think that .Net refers to classes
where VBS/COM refers to objects.

In VBS a class has a more specific definition.
It's a script class. You could also reference a
hierarchy of those if you like:

Dim Cls1

Set Cls1 = New C1
Cls1.C1C2.SomethingOrOther
Set Cls1 = Nothing

Class C1
Public Property Get C1C2()
Set C1C2 = New C2
End Property
End Class

Class C2
Public Sub SomethingOrOther()
MsgBox "OK"
End Sub
End Class




My System SpecsSystem Spec