This bug appears after bug 154322 has been solved: Go to File → New → XML Form Document. On sidebar go to "Instance 1". Right mouseclick on "incstanceData" → "Add Element". Dialog appears with "Element Name:" → 'NewElement'. Press OK. Left mouseclick on "NewElement" (creates a "Binding") Change from "Instance 1" to "Bindings". Only an empty "Binding 1" appears. Back to "Instance 1". Close tree view, reopen tree view and again a click on 'NewElement'. Change to "Bindings". Sometimes "Binding 2: New Element" appears. If it doesn't appear: Save the file, close the file, reopen the file: "Binding 2: New Element" will appear. Seems it is a refreshing problem. If you try to create a new binding while "Binding 2: New Element" doesn't appear name for the new binding will appear as "Binding 3", because "Binding 2" has already be chosen, but doesn't appear.
Repro. I tried with 7.0, but no binding is created at any point. "Close tree view, reopen tree view" means collapse and expand the tree view. Arch Linux 64-bit, X11 Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: cfa463cc5446e72a06db5a457bf4d50d4173f31e CPU threads: 8; OS: Linux 6.2; UI render: default; VCL: kf5 (cairo+xcb) Locale: fi-FI (fi_FI.UTF-8); UI: en-US Calc: threaded Built on 19 April 2023
On pc Debian x86-64 with master sources updated today, I was stuck after this: Left mouseclick on "NewElement" (creates a "Binding") => left mouseclick creates nothing, just select the element. I tried to continue but saw no binding and don't understand how there could be any binding.
Could it be the behaviour changed after the fix for bug 154535?
(In reply to Buovjaga from comment #3) > Could it be the behaviour changed after the fix for bug 154535? Or perhaps I missed something.
(In reply to Julien Nabet from comment #4) > (In reply to Buovjaga from comment #3) > > Could it be the behaviour changed after the fix for bug 154535? > > Or perhaps I missed something. If you have clicked on the new element the binding doesn't appear? So save the file, close the file and reopen the file. It will be there. Or: Try to create a new binding. GUI will chose name "Binding 2", because "Binding 1" will be chosen to the invisible binding.
By the way: With all what you are doing here we will get XML Form documents working. Great!
(In reply to Robert Großkopf from comment #5) > (In reply to Julien Nabet from comment #4) > > (In reply to Buovjaga from comment #3) > > > Could it be the behaviour changed after the fix for bug 154535? > > > > Or perhaps I missed something. > > If you have clicked on the new element the binding doesn't appear? So save > the file, close the file and reopen the file. It will be there. > > Or: Try to create a new binding. GUI will chose name "Binding 2", because > "Binding 1" will be chosen to the invisible binding. Are you ok with the fact that to create a new binding, the only way is to go to the bindings part, then click on "Add item"? I mean, in the description you provided, at which moment LO is supposed to create a binding? BTW, after: " Go to File → New → XML Form Document. On sidebar go to "Instance 1". Right mouseclick on "incstanceData" → "Add Element". Dialog appears with "Element Name:" → 'NewElement'. Press OK. " I tried "Left mouseclick on "NewElement"" and "Right mouseclick on "NewElement"" just to be sure there wasn't a pb left/right click confusion, in both cases no binding which appears. Ideally, a screencast would be useful.
(In reply to Julien Nabet from comment #7) best will be: If I create a new element for an instance and press 'OK' the binding will be created. I will try to show it later. Not enough time at this moment - running for 2 hours now.
Created attachment 186873 [details] Screenshots with 3 steps to create binding automatically Screenshot will show 3 steps to get a new binding created automatically with Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 3ec73488e447a693a14a773a7fb96938036c0324 CPU threads: 6; OS: Linux 5.14; UI render: default; VCL: kf5 (cairo+xcb) Locale: de-DE (de_DE.UTF-8); UI: en-US Calc: threaded (LO version 2023-04-20) First step: Starting to add a NewElement. Second step: Chose name for element and data type. Third step: Binding for NewElement has been created. Note: This will work sometimes. When created the screenshots it had been worked as expected. Might be because I switched between screenshots and LO, might be I set the data type - but it worked automatically. Seems there are different events, which execute to get the binding. Should be only one event: Pressing OK when NewElement should be created.
On pc Debian x86-64 with master sources updated today + kf5 rendering (to be closer to your test), I gave a new try and noticed I hadn't chosen a data type. So with a data type, when going to Bindings part, I see "Binding 1:newElement" and only with one. However, I tried too with LO Debian package 7.4.5.1 and I saw the empty "Binding 1" and a non empty "Binding 2: newElement". Could it be thanks to a very recent commit? (since Buovjaga reproduced the pb with a daily buid from 19/04)
(In reply to Julien Nabet from comment #10) > > Could it be thanks to a very recent commit? (since Buovjaga reproduced the > pb with a daily buid from 19/04) Waiting for a new daily build which includes changes from weekend. I hope it is working now…
(In reply to Robert Großkopf from comment #11) > Waiting for a new daily build which includes changes from weekend. I hope it > is working now… Robert, were you able to test this issue with a recent build?
(In reply to Stéphane Guillou (stragu) from comment #12) > (In reply to Robert Großkopf from comment #11) > > Waiting for a new daily build which includes changes from weekend. I hope it > > is working now… > Robert, were you able to test this issue with a recent build? Have tested it with different versions of LO, with old user profile, with new user profile: Sometimes I got the right result with LO 7.6.4.1, also with LO 24.2.0.3: Create a new element and there has been created a binding. But most of the times there has been created a binding in the background and wasn't shown. I have to save the XML-Formdocument, close it and restart it. Then the binding for the new element would appear. Better than before with the useless empty binding, but not really fixed like the title says: "… shown after reopening" is what most of the times happens here. Tested with OpenSUSE 15.4 64bit rpm Linux.
On pc Debian x86-64 with master sources updated today, I could reproduce this (this time, after File → New → XML Form Document, I followed precisely the process described in the screenshot). I tested with all renderings, the binding part can be reproduce this quite easily but sometimes even the instance pane displays wrong since the new element may be missing. Caolán: thought you might be interested in this one.