Ask Your Question
0

Base Handbook example "Media_with_Macros" has Macro errors when executing, please help fix

asked 2019-01-16 17:12:41 +0200

updated 2019-01-16 17:21:01 +0200

I'm trying to learn Base and how to write Macros is where I'm focused. I use the Base Handbook as my primary reference and study guide. I've downloaded the example files Zip at https://wiki.documentfoundation.org/i... and am working through the Media_with_Macros file since what I need to accomplish in my program resembles how I think the example was programed. Unfortunately, I've discovered errors when Macros execute and being so new to this, I have no expertise to fix it, so I'm asking for help and guidance, please.

Opening the Media_with_Macros file, launch the Media form. Across the bottom of the form are 6 buttons inside a frame titled "Table Maintenance". The first 4 buttons from the left (Category, Mediastyle, Town and Publisher) all fail in a Macro at line 112. The last 2 buttons (Author and AuthorAdd) fail in a Macro at line 105.

I would sincerely appreciate any help and guidance someone can offer.

Thank you in advance!

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2019-01-16 19:17:04 +0200

Ratslinger gravatar image

Hello,

Well, have spent a bit of time with this and the more I dig into it the more errors pop up. At this point it appears to be something which will take some time to resolve all the problems. This is code from some time ago so it is difficult to tell what in LO changes may be affecting it.

The buttons you mention are used to select various tables and use data placed in the control to retrieve the data. This data is then used in a dialog which seems to allow maintenance to records. Not so sure this is what you are looking for.

It may be best to describe what it is you are actually looking to accomplish. Most tasks can be done without the use of macros so if having a problem in Base, just ask here in the Forum.

LO macros will take quite some time to learn. Please see this post -> To learn LibreOffice Base are there introductions or tutorials? which includes links to macro documentation. The best single document is 'Open Office Macros Explained' by Andrew Pitonyak listed under 'INDEPENDENT DOCUMENTATION'. Tough read but lots of info.

edit flag offensive delete link more

Comments

Have now found complete routine missing which is attached to combo boxes on the form. If selected there is an unending error and the LO needs to be killed. With actual missing code there is no sense pursuing this any further. Too many problems and limited coverage in the manual.

Ratslinger gravatar imageRatslinger ( 2019-01-16 20:05:44 +0200 )edit

@Ratsinger - The second paragraph in your answer pretty well sums my expectations - the "maintenance" of other table records (adding/modifying) by clicking a button, is what I wanted to handle my n::m table maintenance need. Based on your additional comment, I question whether the Media_with_Macros example file EVER worked without errors. How sad.

It is disappointing that the example files would not have been kept updated along with new releases of the software and handbook. That doesn't instill confidence in me toward the documentation team for Base.

I will check out the additional post you offered.

Thank you for all your effort, it must have been frustrating for you to find so many problems.

Inkblotr gravatar imageInkblotr ( 2019-01-16 23:54:19 +0200 )edit

Actually, it appears, based on documentation and what little I got from the docs, the dialog was meant to repair bad links between tables and not for table maintenance. It is much harder to perform table updates via a dialog rather than a form. A dialog is not data aware (does not connect directly to tables). So your efforts there may have been futile anyway.

Documentation, as well as all of LO, is maintained by people like you or I - volunteers. A person works on something by choice not by assignment. I blame no one for the problem. Only frustration was that I could not provide an adequate answer to the question.

Now the real situation. The links were informational. Understand that learning macros is no small task. You may want to peruse some of it but your time will be better spent with SQL and the actual forms. The ...(more)

Ratslinger gravatar imageRatslinger ( 2019-01-17 00:09:11 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-01-16 17:12:41 +0200

Seen: 35 times

Last updated: Jan 16