Date: prev next · Thread: first prev next last
2018 Archives by date, by thread · List index

Hi all,

I run LibreOffice (Build-ID: 1:6.0.2-1~bpo9+1) on Debian stretch.  In a base document, 
connected to a PostgreSQL data base, I ran into a really confusing behaviour of forms.

The task: I have two forms.  In the first, when the user clicks a button, the second form (managing 
a list of contacts) shall be opened for entering a new item.  Following the manual, I wrote this 
macro and connected it to the “Execute action” of the button in the first form:

Sub newContact
    oDstForm = thisDatabaseDocument.FormDocuments.getByName("Kontakte verwalten")
    oMainForm = oDstForm.component.getDrawPage.getForms.getByName("ContactForm")
End Sub

This opens the form, but still displays the first entry, which should not happen.

Now for the /really/ puzzling part:  In the macro editor add a breakpoint at any statement in the 
macro.  Now step (shift-F8) through the remaining statements until “End Sub” is reached, and the 
form jumps to a new entry with all fields empty, i.e. does what I expect it to do.

When I place a ”wait 100” statement after “”, the form /also/ behaves properly, but 
I think this is not the correct solution.  Any idea what goes wrong at this point, and what would 
be the correct approach?

Thanks in advance,
To unsubscribe e-mail to:
Posting guidelines + more:
List archive:
All messages sent to this list will be publicly archived and cannot be deleted


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.