Correct way of invoking an object inside an ole object 
Author Message
 Correct way of invoking an object inside an ole object

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



Wed, 04 Feb 2004 07:32:00 GMT  
 Correct way of invoking an object inside an ole object
Costas,

Quote:
> 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.



Wed, 04 Feb 2004 12:47:22 GMT  
 Correct way of invoking an object inside an ole object
On Sat, 18 Aug 2001 00:47:22 -0400, "Bill Schwab"

Quote:

>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



Wed, 04 Feb 2004 19:50:49 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Ole objects invoke codes

2. OLE - Object from another object

3. references to objects inside objects

4. function-objects and code-objects ( was: re-creating objects and security )

5. List of objects sorted in multiple ways

6. (Second try) Query: other ways to implement encapsulated objects

7. Shared Object invoked from CPP

8. Tcl Objects and Invoking Tcl from C

9. Tcl invoke with objects

10. STORABLE - correcting object mismatch

11. How to set object class type for OLE automation

12. Using OLE Objects

 

 
Powered by phpBB® Forum Software