| |
 |
|
| Computers Forum Index » Computer - Databases - Paradox » Setting OleAuto variables to sub-objects... |
|
Page 1 of 1 |
|
| Author |
Message |
| Jim Moseley... |
Posted: Sat Apr 18, 2009 1:56 am |
|
|
|
Guest
|
Greetings, all.
After an hour of trying to figure this out, I'm confused.
How can I assign an OleAuto variable to a sub-object returned with oa.enumObjects(dyn)?
I'm trying to write a recursive 'enumOleProperties' method, to fully expose
everything in one shot. But, I'm stuck at the basics!
Pseudo-code example:
var
oa, oaChild oleAuto
dyn dynArray[] anytype
endVar
if oa.attach(MyOCX) then
if oa.enumObjects(dyn) then
forEach subObjStr in dyn
oaChild.attach(oa.(subObjStr)) ; <-- how do I do this????
endForEach
endif
endif
Thanks,
Jim Moseley |
|
|
| Back to top |
|
|
|
| Robert Wiltshire... |
Posted: Sat Apr 18, 2009 6:16 am |
|
|
|
Guest
|
I tried to put this in terms I have dealt with,
and was stumped too.
I took a working example from using the excel oleauto stuff
var
oaExcel,oaActiveSheet,oaCells oleAuto
stTag string
endvar
xlslib.ExcelOpen(oaExcel)
oaActiveSheet = oaExcel.ActiveSheet
oaCells = oaActiveSheet.cells
That code worked in the context I pulled it from,
and when I tried to do to put the "cells"
into a string...I hit the wall also.
xlslib.ExcelOpen(oaExcel)
oaActiveSheet = oaExcel.ActiveSheet
stTag = "cells"
;none of these worked
oaCells = oaActiveSheet.stTag
oaCells = oaActiveSheet.(stTag)
oaCells = oaActiveSheet^stTag
oaCells = oaActiveSheet^(stTag)
The only thing that comes to my mind right now is,
to build some code on the fly,
and use methodset and execmethod
or possibly executestring.
There were examples of first/next and collection objects in the opal help.
I am not sure if that is approriate for your situation.
Is the control you are working on a publicly available control ?
If I had it on my system,
I might try to help brainstorm/pursue that a little bit further.
Another idea, perhaps Vladimir still sells an oleauto tool.
Good luck
Robert Wiltshire |
|
|
| Back to top |
|
|
|
|
|
All times are GMT
The time now is Sun Nov 22, 2009 8:35 pm
|
|