Correct way of invoking an object inside an ole object

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Correct way of invoking an object inside an ole object

Costas Menico
I have a method inside an ole server called myFunc(arg).

To execute with Visual Foxpro I use

xx=createObject('ole.server')
xx.MyFunc('somestring')

Using Dolphin, I do the equivalent which works well:

xx:=IDispatch createObject: 'ole.server'.
xx invoke: 'myFunc' with: 'somestring'.

But now I also have an object inside the Ole called 'log'

So in VFP i can execute a method of log as follows:

xx.log.writeLog('something')

I am trying to figure out how to do this cascaded with Dolphin. Could
someone help me with the right syntax?

Thanks

Costas


Reply | Threaded
Open this post in threaded view
|

Re: Correct way of invoking an object inside an ole object

Bill Schwab
Costas,

> But now I also have an object inside the Ole called 'log'
>
> So in VFP i can execute a method of log as follows:
>
> xx.log.writeLog('something')
>
> I am trying to figure out how to do this cascaded with Dolphin. Could
> someone help me with the right syntax?

Typically I use the ActiveX Component Wizard to generate classes and
experiment for a while.  If it's something that I plan to keep, then I'll
idiot proof it with some simple entry points, either as methods or new
classes as appropriate.

Of course, you might be ahead of me and already decided against generating,
because it can sometimes create a LOT of classes.  IDispatch class>>example3
uses #getProperty:, and you might find that asking for log as a property
will work.

Try inspecting

     xx typeInfo printIDL

to see if you get some helpful type info.

Does that help?

Bill

--
Wilhelm K. Schwab, Ph.D.
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Correct way of invoking an object inside an ole object

Costas Menico
On Sat, 18 Aug 2001 00:47:22 -0400, "Bill Schwab"
<[hidden email]> wrote:

>Costas,
>
>> But now I also have an object inside the Ole called 'log'
>>
>> So in VFP i can execute a method of log as follows:
>>
>> xx.log.writeLog('something')
>>
>> I am trying to figure out how to do this cascaded with Dolphin. Could
>> someone help me with the right syntax?
>
>Typically I use the ActiveX Component Wizard to generate classes and
>experiment for a while.  If it's something that I plan to keep, then I'll
>idiot proof it with some simple entry points, either as methods or new
>classes as appropriate.
>
>Of course, you might be ahead of me and already decided against generating,
>because it can sometimes create a LOT of classes.  IDispatch class>>example3
>uses #getProperty:, and you might find that asking for log as a property
>will work.
>
>Try inspecting
>
>     xx typeInfo printIDL
>
>to see if you get some helpful type info.
>
>Does that help?
>

Immensely! Thank you.

Costas