OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Where can I get a yaRX?

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
AlanDavidson
OOo Advocate
OOo Advocate


Joined: 09 Mar 2006
Posts: 252

PostPosted: Mon Dec 11, 2006 9:11 am    Post subject: Where can I get a yaRX? Reply with quote

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

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
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Mon Dec 11, 2006 10:04 am    Post subject: Reply with quote

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 https://forum.openoffice.org


Last edited by Villeroy on Mon Dec 11, 2006 4:39 pm; edited 1 time in total
Back to top
View user's profile Send private message
TerryE
Super User
Super User


Joined: 16 Jul 2006
Posts: 550
Location: UK

PostPosted: Mon Dec 11, 2006 4:26 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group