[Base] Access2Base - Last version: 6.3

Discussions about using 3rd party extension with OpenOffice.org

Re: [Base] Access2Base - Last version: 6.3

Postby JPL » Wed Nov 20, 2019 10:47 am

@gelinp

I never experienced myself the need of coordinating the events in a form or in controls with semaphors or similar.

If your own experience is different, you should file a bug in https://bugs.documentfoundation.org/ with a good example of misbehaviour of the events queues.

Regards.
JPL
Kubuntu 20.04 / LibO 7.0
Access2Base (LibO).
BaseDocumenter extension (LibO)
Documentation on http://www.access2base.com and http://www.access2base.com/basedocumenter
JPL
Volunteer
 
Posts: 110
Joined: Fri Mar 30, 2012 3:14 pm

Re: [Base] Access2Base - Last version: 6.3

Postby Villeroy » Wed Nov 20, 2019 11:12 pm

My mouse events are triggered twice with LibreOffice 6.3 but not with LibreOffice 6.2.
My routine starts like this:
Code: Select all   Expand viewCollapse view
Sub onMouseRelease(e)
If e.Buttons = 1 and e.ClickCount = 2 and e.Modifiers = 0 and e.PopupTrigger = False then
msgbox "Yep"

This is called twice with every double-click on a table control. The actual code in place of the msgbox inserts a value from the table control into another table so the table control behaves like a multi-column list box.

Now I try this:
Code: Select all   Expand viewCollapse view
Sub onMouseRelease(e)
Static X As Integer
If X=0 and e.Buttons = 1 and e.ClickCount = 2 and e.Modifiers = 0 and e.PopupTrigger = False then
X=X+1
msgbox X

The msgbox is called only once but if the actual code performs a record insertion, the X variable is reset and 2 records are inserted instead of one.
Then I tried the same trick with a global X which raised very irritating errors about form objects that could not be found anymore. I changed nothing else, just replaced the static X with a global integer X.
I downgraded my database clients to LO 6.2. When I find some hour or two I'll set up a simple test case with embedded HSQL for a detailed bug report.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 28854
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: [Base] Access2Base - Last version: 6.3

Postby Villeroy » Sat Nov 23, 2019 11:20 pm

Possibly I'm off topic here but the bug is real: https://bugs.documentfoundation.org/sho ... ?id=128988
Please move to the Base forum.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 28854
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: [Base] Access2Base - Last version: 6.3

Postby DonaldS » Wed Jan 01, 2020 11:54 pm

With "TT NorthWind.odb" & "TT NorthWind StandAlone.odt" both open, if I click "Start" in "TT NorthWind StandAlone.odt" I get-

Error #91 (Object variable not set) occurred at line 504 in Form.Controls

line 504 has-
iCount = FormsCollection.Count

This error seems to be because FormsCollection has not been initialised when the A2B code is called from "TT NorthWind StandAlone.odt" macro code.

Similar code seems to work from the calculator form (and Dialog) from "TT NorthWind.odb"
How can I fix this or what is the problem?

Using-
Manjaro Linux
KDE
LO Version: 6.4.0.0.beta1

thanks Donald
OOo 3.0.X on Linux-Other
DonaldS
 
Posts: 6
Joined: Tue Apr 21, 2009 1:09 am

Re: [Base] Access2Base - Last version: 6.3

Postby JPL » Mon Jan 06, 2020 4:12 pm

@DonaldS,

the good news is that I could reproduce the problem.
The bad news is that the functionality of calling Access2Base from a standalone form seems broken at this moment and that I need some time to repair it.

Thanks for your feedback and for your patience.

JPL
Kubuntu 20.04 / LibO 7.0
Access2Base (LibO).
BaseDocumenter extension (LibO)
Documentation on http://www.access2base.com and http://www.access2base.com/basedocumenter
JPL
Volunteer
 
Posts: 110
Joined: Fri Mar 30, 2012 3:14 pm

Re: [Base] Access2Base - Last version: 6.3

Postby gelinp » Sat Nov 07, 2020 9:46 am

Hi,

I'm with Access2Base 6.4.0 and LibreOffice 6.4.6.2 With Linux. I'm using Access2Base shortcuts with an formula into my Base application (not standalone formula).

Code: Select all   Expand viewCollapse view
My formula structure is giving into piece attachment :
FORM_CATALOGUEDOCUMENTAIRES
    + Mainform
         + SubFormPlanClassement


So the problem is that I can't use Shortcut, without errors ...

I've got shortcut context to see it and call it by even like that I get error ! With tutorial I tried getObject like this:
Code: Select all   Expand viewCollapse view
v = Application.getObject("Forms!Mainform!SubFormPlanClassement")

but it's same error ...

Note that when I open a new formula there is no "Mainform" registered into structure, it's totally empty ... So Mainform is added by me, but I'm wondering if it is well registered ...

See uploaded files :
* one fiel for error message
* the other about formula structure

It's not easy to give you the file because database is extern HSQLDB server ...
thank for your help.
Patrick
Attachments
Capture du 2020-11-07 08-37-36.png
Error message
Capture du 2020-11-07 08-20-33.png
Formula structure...
Libreoffice 6.4.6.2, Kernel: 5.4.0-52-generic x86_64 bits: 64
Desktop: Cinnamon 4.4.8 Distro: Linux Mint 19.3 Tricia
gelinp
 
Posts: 28
Joined: Mon Oct 09, 2017 9:27 pm

Re: [Base] Access2Base - Last version: 6.3

Postby JPL » Sat Nov 07, 2020 11:09 am

Hi,

Only a guess:
in
Code: Select all   Expand viewCollapse view
v = Application.getObject("Forms!Mainform!SubFormPlanClassement")

the name of the form seems missing.
I would rather expect something like
Code: Select all   Expand viewCollapse view
v = Application.getObject("Forms!theformname!Mainform!SubFormPlanClassement")


JPL
Kubuntu 20.04 / LibO 7.0
Access2Base (LibO).
BaseDocumenter extension (LibO)
Documentation on http://www.access2base.com and http://www.access2base.com/basedocumenter
JPL
Volunteer
 
Posts: 110
Joined: Fri Mar 30, 2012 3:14 pm

Re: [Base] Access2Base - Last version: 6.3

Postby gelinp » Sat Nov 07, 2020 2:13 pm

Hi,
Thank you for your response. I tried again with absolute path and MainForm Parent's name like this :

v = Application.getObject("Forms!CATALOGUEDOCUMENTAIRES!Mainform")

But the problem is same ... I tried to play with case : MainForm, mainform... but problem is the same ...

I thing problem will come because new main form is created without Mainform and I added it by hand... It's not standalone form, and database connection is active. There is no sections, it's only subforms and grids cascade...

Patrick
Attachments
Capture du 2020-11-07 13-04-21.png
New try with error message
Libreoffice 6.4.6.2, Kernel: 5.4.0-52-generic x86_64 bits: 64
Desktop: Cinnamon 4.4.8 Distro: Linux Mint 19.3 Tricia
gelinp
 
Posts: 28
Joined: Mon Oct 09, 2017 9:27 pm

Re: [Base] Access2Base - Last version: 6.3

Postby JPL » Sat Nov 07, 2020 3:52 pm

Ooops, I was wrong.

"MainForm" should be left out.
Code: Select all   Expand viewCollapse view
v = Application.getObject("Forms!CATALOGUEDOCUMENTAIRES!SubFormPlanClassement")

should do the job if CATALOGUEDOCUMENTAIRES is the name of the form and SubFormPlanClassement one of its controls.

Read http://www.access2base.com/access2base.html#%5B%5BShortCut%20Notation%5D%5D
and http://www.access2base.com/access2base.html#ShortcutNotationMore.

JPL
Kubuntu 20.04 / LibO 7.0
Access2Base (LibO).
BaseDocumenter extension (LibO)
Documentation on http://www.access2base.com and http://www.access2base.com/basedocumenter
JPL
Volunteer
 
Posts: 110
Joined: Fri Mar 30, 2012 3:14 pm

Re: [Base] Access2Base - Last version: 6.3

Postby gelinp » Thu Nov 26, 2020 7:19 pm

Thanks, it's OK :-)

Now I've got an other problem accessing a form at same base level that 'MainForm', a parallel Form... I tested With sample which screen capture attached in file. The second Base Form is 'SubFormFiltre'. So the error is below :

Code: Select all   Expand viewCollapse view
Application.getObject("Forms!FORM_TACHES_A_FAIRE!SubFormFiltre.Form!CTRL_PERIODES") >> Error, Access2Base can't find SubFormFiltre, because it look for a suib form of MainForm...


I'll need something like ..\relativePathtoSomething :

Code: Select all   Expand viewCollapse view
Application.getObject("Forms!FORM_TACHES_A_FAIRE!..!SubFormFiltre.Form!CTRL_PERIODES") >> I need a go up one level up to MainForm before to down to SubFormFilter...


Using a Second Form like "MainForm" is a good practice for Navigation or Filter. It's not a hierarchical dependency. Also a base form look's like independent Form and content is not refresh cascading from MainForm. If I put a ListBox in 'SubFormFilter' without table but only Value List Content, Then if I put Document into icon and I restore it, the ListBox content is empty If it's a subform of Mainform, but it's OK if it is a 'independent Form'.

Thank you for your help
Patrick
Attachments
Capture du 2020-11-26 18-14-51.png
Libreoffice 6.4.6.2, Kernel: 5.4.0-52-generic x86_64 bits: 64
Desktop: Cinnamon 4.4.8 Distro: Linux Mint 19.3 Tricia
gelinp
 
Posts: 28
Joined: Mon Oct 09, 2017 9:27 pm

Re: [Base] Access2Base - Last version: 6.3

Postby JPL » Fri Nov 27, 2020 11:59 am

I'm afraid that the described configuration of forms/subforms cannot be handled with the shortcut notation (which is an MSAccess concept ...).

BTW, when a subform is not related to a table and contains a listbox with hard values, I don't see why the listbox should not be initialized with what you expect ??

Regards.
JPL
Kubuntu 20.04 / LibO 7.0
Access2Base (LibO).
BaseDocumenter extension (LibO)
Documentation on http://www.access2base.com and http://www.access2base.com/basedocumenter
JPL
Volunteer
 
Posts: 110
Joined: Fri Mar 30, 2012 3:14 pm

Re: [Base] Access2Base - Last version: 6.3

Postby gelinp » Fri Nov 27, 2020 5:51 pm

Ok. Thank you for your response.

About my listbox in Subform not related to a table, it is well initialised, but it's a refresh problem, when I put windows as icon and go back to original size. Problem is coming only if this subform as a parent Form with database source. I think that Parent Form refresh and then cascade refresh event-s to all subforms. And I think that problem will be that subform looks for master-s field-s values to synchronise with parent form, but slaves fields are empties, because subform doesn't use a table source ... Because refresh procedure will be a data source without any table it will miss refresh procedure, or something like that... But I tested same subform at first level (like mainform), without any more refresh problems... Best pracrtices recomand to use a navigation form at same Mainform level, then synchronize Mainform with item selected into Navigation form. So I could retrieve old basic source code I writed already to do the job to find all first levels forms ...

Thank you.
Patrick
Libreoffice 6.4.6.2, Kernel: 5.4.0-52-generic x86_64 bits: 64
Desktop: Cinnamon 4.4.8 Distro: Linux Mint 19.3 Tricia
gelinp
 
Posts: 28
Joined: Mon Oct 09, 2017 9:27 pm

Re: [Base] Access2Base - Last version: 6.3

Postby Villeroy » Fri Nov 27, 2020 7:34 pm

[Base, Python] Tiny Macro Refreshing Forms, List/Combo Boxes refreshes anything refreshable on any (sub/parent) form when some record has been updated, deleted or inserted. Just install (one click) and create a list of refreshables in a hidden control named "AutoRefresh" and assign the "record modified" event.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 28854
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Previous

Return to Extensions

Who is online

Users browsing this forum: No registered users and 3 guests