Yes, pcall is definitely a way to go.
I recommend using the "disp" class. Try its "info".

However, I think it does not directly support arrays.
But the good news is that it is all open, and you
can use the debugger to trace the "invoke" and the
part where it converts variants to J objects.

You should be able to user "oleaut" functions to
iterate SAFEARRAY and apply variant conversion getting
J boxed array memberwise.


--- bill lam <[EMAIL PROTECTED]> wrote:

> I tried again
>    wd 'olemethod ooh base arr0'
> where arr0 is vb ole server method return an array
> 
> Public Function arr0() As Variant
> Dim array()
> arr0 = array
> End Function
> 
> but wd give an "unsupported type" error. It seems that current wd does not 
> support array as parameter or result.  I guess that it needs to write a VB 
> proxy 
> to use openoffice calc.
> 
> bill lam wrote:
> > I tried to do the follow
> > 
> > wd 'pc xlauto'
> > wd 'cc xl oleautomation:com.sun.star.ServiceManager'
> > wd 'olemethod xl base createInstance "com.sun.star.frame.Desktop"'
> > wd 'oleid xl odesk'
> > 
> > NB. up to this line ok, but for this cause an error, where Array() 
> > should be an ole empty array.
> > wd 'olemethod xl odesk loadComponentFromURL "private:factory/scalc" 
> > "_blank" 0 Array()'
> > 
> > These also fails,
> > wd 'olemethod xl odesk loadComponentFromURL "private:factory/scalc" 
> > "_blank" 0 ""'
> > wd 'olemethod xl odesk loadComponentFromURL "private:factory/scalc" 
> > "_blank" 0'
> > 
> > Is there any means to pass the last argument as an empty array? Or could 
> > this be done using pcall interface?



 
____________________________________________________________________________________
Need a quick answer? Get one in minutes from people who know.
Ask your question on www.Answers.yahoo.com
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to