[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

WIN32OLE : how to get put-property types?

Bruno Le hyaric

6/11/2009 9:01:00 AM

Hi,

I'm trying to make a generic COM web server that permits to interact
with any COM object through a web browser...

I've tryed first to do that using Python, but the reflexivity wasn't
good enough (not working with COM object methods).

Ruby reflexivity works well with COM objects except with put properties.

I need to get the type of the property I want to set?

I try :

prop = obj.ole_put_methods.first
prop.params
=> []
prop.size_params
=> 1 (not coherent with previous result)
prop.return_type
=> VOID

is there a lack in win32ole reflexivity?
--
Posted via http://www.ruby-....

3 Answers

Bosko Ivanisevic

6/11/2009 10:55:00 AM

0

On Jun 11, 11:00 am, Bruno Le hyaric <bruno.lehya...@gmail.com> wrote:
> Hi,
>
> I'm trying to make a generic COM web server that permits to interact
> with any COM object through a web browser...
>
> I've tryed first to do that using Python, but the reflexivity wasn't
> good enough (not working with COM object methods).
>
> Ruby reflexivity works well with COM objects except with put properties.
>
> I need to get the type of the property I want to set?
>
> I try :
>
> prop = obj.ole_put_methods.first
> prop.params
> => []
> prop.size_params
> => 1    (not coherent with previous result)
> prop.return_type
> => VOID
>
> is there a lack in win32ole reflexivity?
> --
> Posted viahttp://www.ruby-...

Put property has VOID return type. Since it is put property it does
not return any value.

Regards,
Bosko

Masaki Suketa

6/11/2009 11:40:00 AM

0

Hello,

Bruno Le hyaric wrote:
> I need to get the type of the property I want to set?
>
> I try :
>
> prop = obj.ole_put_methods.first
> prop.params
> => []
> prop.size_params
> => 1 (not coherent with previous result)
> prop.return_type
> => VOID
>
> is there a lack in win32ole reflexivity?

If there is a get-property corresponding to the put-property, then

obj.ole_get_methods.find {|m|
m.progid == prop.progid
}.return_type_detail

But if there isn't corresponding get-property,
there is no way to get the type of put-property.

Regards,
Masaki Suketa

Bruno Le hyaric

6/11/2009 12:47:00 PM

0

Ok, thank you for your quick answers
--
Posted via http://www.ruby-....