| View previous topic :: View next topic |
| Author |
Message |
AlanDavidson OOo Advocate

Joined: 09 Mar 2006 Posts: 252
|
Posted: Mon Dec 11, 2006 9:11 am Post subject: Where can I get a yaRX? |
|
|
A yaRX works like this:
yaRX getFolderContents()
It produces the result:
| Code: | getFolderContents()
XSimpleFileAccess 'interface
SimpleFileAccess 'service
ucb 'module |
So a yaRX is an upside-down XRay.
I then write:
| Code: | oSimpleFileAccess = CreateUnoService("com.sun.star.ucb.SimpleFileAccess")
sFolderContents() = oSimpleFileAccess.getFolderContents("file:///c:/",False) |
After these lines are written, XRay is indispensable. But we still need to know which UNO service to create in order to get to the stage where we can use XRay. This can involve a lot of searching through the API.
Last edited by AlanDavidson on Tue Dec 12, 2006 2:19 am; edited 1 time in total |
|
| Back to top |
|
 |
Villeroy Super User


Joined: 04 Oct 2004 Posts: 10065 Location: Germany
|
Posted: Mon Dec 11, 2006 10:04 am Post subject: |
|
|
You may write your own, utilizing a software like this one:
http://htdig.org
http://htdig.org/howitworks.html
I use it preconfigured with my http-proxy and I've seen it working with the help-system of the SuSE-distribution. The CGI-scripting looks easy. Possibly it works localy without a http-server and javascript.
EDIT: Reading this thread again, I notice that I forgot to mention a tool like htdig could be used. It can create a searchable index of the html-API-reference. You call a html-form and search the indexed API-reference for XInterface. You'll get a list of documents where "XInterface" occurs. _________________ Rest in peace, oooforum.org
Get help on http://forum.openoffice.org
Last edited by Villeroy on Mon Dec 11, 2006 4:39 pm; edited 1 time in total |
|
| Back to top |
|
 |
TerryE Super User

Joined: 16 Jul 2006 Posts: 550 Location: UK
|
Posted: Mon Dec 11, 2006 4:26 pm Post subject: |
|
|
Alan, all UNO object must support instrospection services and if you look at the Xray code you will see that Xray is build on these, plus a little understanding of how Basic does its mapping of pseudo properties.
Note however that the model is that an object can have multiple interfaces, and an interface can implement multiple methods and properties. So a method such as getByName will be implemented by dozens of objects, and in fact methods can be multiply implemented by a given object through different interfaces.
For these reasons it is not trivial to implement your yaRX. You would need to build a graph of all known objects and then have your yaRX build a tree for any given method, etc. //Terry |
|
| Back to top |
|
 |
|