>I create an OLE PUBLIC object in vfp8, parent class custom.
>During runtime I add a collection class to the ole object via addobject in the dosomething method.
>The automation server runs fine but the client can not access new objects added to the ole server object.
>Is there a way to make child objects available to the client ?
>
>... access the server in scripting host or vb:
>
>' create the ole server
>set myole = createobject("oleserver.vfp8")
>' add the collection object mycollection in the dosomething method of vfp8
>myole.dosomething()
>msgbox myole.mycollection.name 'displays "mycustom.mycollection", ok
>
>msgbox myole.mycollection.count
>' generates an error, the count property can't be accessed
>
>thanks around
When defining your oleserver.vfp8, add a mycollection property in the clas definition. That way the property will be built into the interface. When you attempt to access the mycollection property, you should be able to. Because of VFP's late binding in this case, you should then be able to access the properties of whatever is stored in that property (in this case, a collection).
HTH.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao