ObjectInspectorComparison

From Apache OpenOffice Wiki
Revision as of 17:21, 10 February 2009 by SergeMoutou (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

OOoBasic generation

I want to generate OOoBasic code for the example showed here.

Object Inspector 1.0

The old Object Inspector is very easy to use. You never have to "invoke", only to walk through the IDL-tree. It is also able to generate this code :

Sub Main(_oUnoEntryObject as Object)
	Dim xController as Object
	xController = _oUnoEntryObject.getCurrentController()
	Dim oSelection as Object
	oSelection = xController.getSelection()
	Dim oIndex as Object
	oIndex = oSelection.getByIndex(0)
	Dim sString as String
	sString = oIndex.getString()
End Sub

It's a kind of Sub (which I wouldn't name Main) with a parameter. You call it with ThisComponent and it works properly, perhaps with a print sString to see the corresponding result in a message Box.

Object Inspector 2.0

Using this Object Inspector is less intuitive than the previous one. It's impossible to walk through the IDL tree. It shows you the result of a method but you have to "invoke" this method to walk trough the complete IDL-Tree and sometimes it doesn't work : for me the getByIndex doesn't work. The problem of invoking is you create a new window and when generating the code you have to generate the code in every windows.

Personal tools