The java package uses the same system, so if it works for java object, it should
logically also work for COM objects. By looking at the code for both, I can't
see any obvious difference. Some debugging might be needed, but I can't
investigate at the moment.

Michael.


On Wed, Jun 29, 2011 at 11:07 AM, Philip Nienhuis <[email protected]> wrote:
> Hi Michael,
>
> While trying the windows package with Tatsuro Matsuoka's octave-3.4.2 MingW
> testing binary, I hit an old error:
>
> =========================================
> octave.exe:29> xlapp = actxserver ('Excel.Application')
> xlapp =
>
> <COM object _Application (0x0x2767d4)>
>
> octave.exe:30> wb = xlapp.Workbooks.Open (fname)
> error: can't perform indexing operations for octave_com_object type
> octave.exe:30> fname
> fname = C:\Home\Philip\Mydocs\Octave\spreadsheet-tst\test75.xls
> =========================================
>
> Apart from some warnings in grab.cc, the windows package installed fine; the
> messagebox & com_<> function work OK.
> But the object-oriented stuff doesn't work.
>
> Using the com_get() / get() & com_invoke() (also get() ) functions I can
> work with the Excel file, but this is a bit of a hassle.
>
> From the info in your answer from 2 years back (copied below), I conclude it
> must be related to the dispatch() stuff. I got this warning when compiling
> the windows package:
>
> "warning: dispatch is obsolete and will be removed from a future version of
> Octave; please use classes instead"
>
> .... from which I conclude that dispatch() should still work, however.
>
> Where can I look to get past this error?
>
> I've copied the install log (-verbose flag) of pkg install to this e-mail.
>
> Thanks,
>
> Philip
>
>
> Michael Goffioul wrote:
>>
>> On Sun, Jun 21, 2009 at 11:08 AM, Philip Nienhuis<[email protected]>
>>  wrote:
>
> <snip>
>>>
>>> 1. Any hints on Where can I find more info on the web about com_****
>>> functions? I'm not quite proficient with COM, I used some info I found in
>>> your example mat2xls script (fairly basic) and in contributed background
>>> docs on the Mathworks site (a bit more elaborate).
>>
>> There are not much to say about that, these functions are just the
>> functional counterpart of the COM indexing you're used to. For instance,
>> when octave reads obj.prop and obj is a COM object, it ends up calling
>> com_get(obj, 'prop'). The available functions are:
>>
>> com_get(obj, 'prop') =>  obj.prop
>> com_set(obj, 'prop', val) =>  obj.prop = val
>> com_invoke(obj, 'fun', arg0, ...) =>  obj.fun(arg0, ...)
>> com_delete(obj) =>  release the COM object
>> com_release(obj) =>  identical to com_celete(obj)
>>
>> Now, because all these functions are also "dispatch"-ed, you can
>> use them without the "com_" prefix. That is get(obj, 'prop'),
>> invoke(obj, 'fun', arg0, ...)
>> and so on.
>
>
>
>

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Octave-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to