Michael Goffioul wrote:
> Additionally, does it work if you decompose the statement in 2:
>
> wbs = xlapp.Workbooks
> wb = wbs.Open(fname)

octave.exe:2> xlapp = actxserver ('Excel.Application')
xlapp =

<COM object _Application (0x0x26db8c)>

octave.exe:3> wbs = xlapp.Workbooks
error: can't perform indexing operations for octave_com_object type
octave.exe:3>

> On Wed, Jun 29, 2011 at 5:18 PM, Michael Goffioul
> <michael.goffi...@gmail.com>  wrote:
>> The java package uses the same system, so if it works for java object, it 
>> should
>> logically also work for COM objects.

Yes, I thought of that too, but:
(1) I saw no warnings about deprecated "dispatch" when installing the 
java package.
(2) In the java pkg PKG_ADD 
(...\lib\octave\packages\java-1.2.8\i686-pc-mingw32-api-v45+ there are 
no dispatch statements at all, while there are many in the corresponding 
windows-1.0.8 pkg PKG_ADD.
(3) In __java__.cc there's no "dispatch" text snippet to be found, 
__COM__.cc is riddled with it (DISPATCH_METHOD etc). But I might be 
looking in the wrong place.

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

Do you have the latest java code? Martin Hepperle fixed a lot of code 
that induced warning errors during compilation.

As to debugging: can you give any hint in what part of the code I should 
look? (I'm not good in c++ but I can always give it a try)

Thanks,

Philip


>> On Wed, Jun 29, 2011 at 11:07 AM, Philip Nienhuis<pr.nienh...@hccnet.nl>  
>> 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<pr.nienh...@hccnet.nl>
>>>>   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
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to