BTW, i have used this technique ALL THE TIME in my work on Watir.

Another good method is "ole_get_methods" which is handy when you are 
trying to pull some information from an element.

Bret

Phlip wrote:
> Charley Baker wrote:
>
>   
>> As far as activex controls I'm not quite sure how that figures in to
>> your question, but follow Phlip's advice if it does.
>>     
>
> I don't mean ActiveX controls embedded in a web page.
>
> I mean that each gizmo in the DOM - every Element, Form, Attribute,
> etc, is itself an Automation object. (A COM, OLE, ActiveX object, with
> an IUnknown interface, a dual IDispatch interface, etc, just like a
> high-end ActiveX Object!)
>
> You don't need to know that, but you do need to know how to query such
> an object for its "Intellisense". A real Ruby object responds to
> .public_methods to generate a list of members, but a Ruby OLE object
> only responds to OLE messages by throwing and catching its "unknown
> method" error. So .public_methods can't return all the methods that
> _aren't_ there!
>
> Call this on any DOM object:
>
> def docOle(thing)
>     puts thing.ole_methods.collect{|m| m.name }.sort()
> end
>
> It barfs out a sorted list of all your object's members (using the
> secret IDispatch member query system).
>
> (The other way to get good Intellisense is write a scratch project in
> Visual Basic, and use that smarmy editor's introspection and code
> browsing features. Then port what you learn back to Ruby!;)
>
>   

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to