About BASIC or MACRO. How do I get the name, properties and actions of Objects ?

Hi~,
I am getting start with writing some Macro for Forms in Libreoffice Base,
I read some tutorials and guidelines, but I still don't know how do I get
the name, properties and actions of Objects ?
Would you tell me any information about this?

e.g.:
I have a table in Form1 (Libreoffice Base).
What's the object name of the table?
What actions can be done for this table?

Thank you!

Best Regards,
Minhsien0330

Hi~,
I am getting start with writing some Macro for Forms in Libreoffice Base,
I read some tutorials and guidelines, but I still don't know how do I get
the name, properties and actions of Objects ?
Would you tell me any information about this?

e.g.:
I have a table in Form1 (Libreoffice Base).
What's the object name of the table?
What actions can be done for this table?

Thank you!

Best Regards,
Minhsien0330

Hi,

[Tutorial] Introduction into object inspection with MRI

https://forum.openoffice.org/en/forum/viewtopic.php?f=74&t=49294

And of course you need to understand the architecture of services,
interfaces and language independent data types.
This is not for people who can not program anything beyond stolen VBA
snippets. One advantage is that you are not limited to this awkward
Basic lingo of the early 90ies.

Andreas Säger wrote:

> > Hi~,
> > I am getting start with writing some Macro for Forms in Libreoffice Base,
> > I read some tutorials and guidelines, but I still don't know how do I get
> > the name, properties and actions of Objects ?
> > Would you tell me any information about this?
> >
> > e.g.:
> > I have a table in Form1 (Libreoffice Base).
> > What's the object name of the table?
> > What actions can be done for this table?
> >
> > Thank you!
> >
> > Best Regards,
> > Minhsien0330
> >
>
> Hi,
>
> [Tutorial] Introduction into object inspection with MRI
> > https://forum.openoffice.org/en/forum/viewtopic.php?f=74&t=49294
>
> And of course you need to understand the architecture of services,
> interfaces and language independent data types.
> This is not for people who can not program anything beyond stolen VBA
> snippets. One advantage is that you are not limited to this awkward
> Basic lingo of the early 90ies.
>
I can second that about MRI. I think it is invaluable. But if you want to do serious programming you also need the developer's guide (https://wiki.openoffice.org/w/images/d/d9/DevelopersGuide_OOo3.1.0.pdf)
It is huge but you can find valuable information there about all the internals. The code examples are in Java, however.
The document is a bit old, but I don't think much has changed. It is basically the same as the website (https://wiki.openoffice.org/wiki/Documentation/DevGuide/OpenOffice.org_Developers_Guide).
Then for Database access you can use Andrew Pitonyak's AndrewBase document that you can download from http://www.pitonyak.org/database/. It has examples of accessing Forms, and it uses Basic.

I followed the link above. It took me to a download page for MRI 1.2.4
which fails to install even though it says right under the download link
that it is compatible with LO 4.

I started Libreoffice as root user then used the menu option Tools =>
Extension Manager which opens the Extension Manager window. I clicked
the [Add] button and navigated to the file MRI 1.2.4. Again, it fails
to install.

(soffice:11595): Gtk-WARNING **: Attempting to store changes into
`/root/.local/share/recently-used.xbel', but failed: Failed to create
file '/root/.local/share/recently-used.xbel.74D5XX': No such file or
directory

(soffice:11595): Gtk-WARNING **: Attempting to set the permissions of
`/root/.local/share/recently-used.xbel', but failed: No such file or
directory

It appears to have installed as a User extension, not a system
extension, not that it matters since it seems to not work. If I right
click on the extension in the Extension Manager window and select
"Update" from the drop down then version 1.2.5 is displayed as an
update. When I click to accept the update it fails to download.

At the bottom of the window there is a hyperlink "Get more extensions
online..." which brings me to http://extensions.libreoffice.org/. There
I click on the "Extensions" tab. There I type "MRI" in the text box
next to the [Search] button. I click the [Search] button. the MRI-UNO
Object Inspection Tool is found. It says the latest release is
compatible with LibreOffice 3.3, 3.4, and 3.5. I have 4.0.4.2. :frowning:

I have MRI Version 1.2.4 successfully installed on LO 4.3.6.2 on CentOS7 64Bit,
and it works fine.

regards,
fred

There is one minor problem, though. The [IDL Ref] button leads to
nowhere. In OpenOffice it takes you to the online object reference for
the current item.
LibreOffice changed the whole structure of the IDL reference so you need
to look up your items manually or point it to the OpenOffice reference
keeping in mind that there may be some differences.

Manfred Bertl wrote:

>
> >
> > I followed the link above. It took me to a download page for MRI 1.2.4
> > which fails to install even though it says right under the download link
> > that it is compatible with LO 4.
> >
> > [...many lines deleted...]
> > compatible with LibreOffice 3.3, 3.4, and 3.5. I have 4.0.4.2. :frowning:
> >
>
> I have MRI Version 1.2.4 successfully installed on LO 4.3.6.2 on CentOS7 64Bit,
> and it works fine.

I installed 1.2.5 from Github (https://raw.githubusercontent.com/hanya/MRI/master/files/MRI-1.2.5.oxt) on LO 4.4.3.1 and on master, on Mac OS X 10.10.3 (Yosemite) for all users with sudo unopkg, without problems. But if I remember correctly, I first did a user install, just with Tools > Extension Manager, selecting the downloaded file, also without problems.

/root ???

Hi,

I followed the link above. It took me to a download page for MRI 1.2.4
which fails to install even though it says right under the download link
that it is compatible with LO 4.

I started Libreoffice as root user then used the menu option Tools =>
Extension Manager which opens the Extension Manager window. I clicked
the [Add] button and navigated to the file MRI 1.2.4. Again, it fails
to install.

From memory, you shouldn't need to be root to install the extension, it

should install just fine as a normal user extension.

Alex

Yup, root. I was trying to install it as a system wide extension. That
would take root powers.

Maybe I need a little hand holding. I RTFM and followed the
instructions but no soap. Can any of you who were successful tell me
how you got it installed for Libreoffice 4 as a system wide extension?

That is probably true as that's pretty much what happened when I tried
to install it, even though it didn't work. I want it to be a system
wide extension so I'm going to need root powers to do that some time. I
have no clue how though. Can someone leave me a bread crumb trail?

$ cd $LO_PATH/program
$ ./unopkg --help

Under Ubuntu you can run the following to start the graphical extension
manager with root permissions:
$ sudo ./unopkg gui

NOOOO. DO NOT RUN THAT!
Now I can not start the program anymore. I get a (translated) error
message when starting LO:
"Application can not start. The user-defined installation could not be
finished."
Solutions anyone?

Mark LaPierre wrote:

> Yup, root. I was trying to install it as a system wide extension. That
> would take root powers.
>
> Maybe I need a little hand holding. I RTFM and followed the
> instructions but no soap. Can any of you who were successful tell me
> how you got it installed for Libreoffice 4 as a system wide extension?

I did it on Mac OS X with
sudo /Applications/LibreOffice.app/Contents/MacOS/unopkg

On other systems you would have to locate unopkg, but for the rest it should be the same.

You can use unopkg add, or (as I did if I remember correctly) unopkg gui.
For help give unopkg --help

The difference between sudo and running as root is that with sudo you get root privileges, but you are still running in the user's environment.

Restored my user profile from yesterday's backup.