[Solved] Endless loop with "ExtensionCompiler.ott"

Discussions about using 3rd party extension with OpenOffice.org
Post Reply
reinralle
Posts: 4
Joined: Sun Oct 11, 2020 9:39 am

[Solved] Endless loop with "ExtensionCompiler.ott"

Post by reinralle »

Hi folks,

am trying to learn some about develop Extensions. In the course of this I found Extension Compiler v2.1.2 by B. Marcelly.

My problem is, that if I start the template II'am running in an endless while loop:

A new *.odt file is created and pop up the following constantly:
  • 1) a MessageBox with text: "After this message you will be asked to store this doc..."
    2) a Dialog let me choose the store path
but whatever is chosen, everything repeats itself. The only way to stop this, is to terminate LO with "Task-Manager".
(btw: nothing is stored or created under chosen path)

Am I doing something wrong or did I not understand something correctly? Maybe a bug?

Thx for some hints

Ralf
 Edit: Ok I think I found the reason. The "guilty" option I' had set in the past was:
  • Extra - Options - Load/Save - General - Edit document properties before saving
:bravo: 

Code: Select all

Sub checkDocumentHasName

  Dim currWindow As Object, dispatcher As Object

  initToolIdentity
  Do While Len(ThisComponent.Url) = 0
    MsgBox(txt0241, 48, ToolIdentity)
    currWindow = ThisComponent.CurrentController.Frame
    dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
    dispatcher.executeDispatch(currWindow, ".uno:SaveAs", "", 0, Array())
  Loop

End Sub
Last edited by reinralle on Thu Feb 04, 2021 9:05 am, edited 30 times in total.
LibreOffice 7.0.4.2 (x64) on Windows 10 (20H2 - Build 19042.782)
JeJe
Volunteer
Posts: 2781
Joined: Wed Mar 09, 2016 2:40 pm

Re: Prob with "ExtensionCompiler.ott" (2.1.2)

Post by JeJe »

Works for me:

Click on okay
A Save As dialog pops up
I right click in the main pane and create a new folder with the name of my future extension and double click to open it
I Rename Untitled 1 to the name of my future extension and click save

I then go to the new file in the new folder and click on the file
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
JeJe
Volunteer
Posts: 2781
Joined: Wed Mar 09, 2016 2:40 pm

Re: Prob with "ExtensionCompiler.ott" (2.1.2)

Post by JeJe »

It goes round in a loop if you click on cancel instead of save.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
reinralle
Posts: 4
Joined: Sun Oct 11, 2020 9:39 am

Re: Prob with "ExtensionCompiler.ott" (2.1.2)

Post by reinralle »

Thank you for your quick response!
JeJe wrote:It goes round in a loop if you click on cancel instead of save.
nope, I pressed Save and not Cancel => endless loop under LO ! (no matter which path or filename I try)

Have just install AOO 4.8 and all seems OK now, but still wonder that it differ from LO. Nevertheless, needs to dive deeper.
Last edited by reinralle on Wed Feb 03, 2021 5:38 pm, edited 10 times in total.
LibreOffice 7.0.4.2 (x64) on Windows 10 (20H2 - Build 19042.782)
JeJe
Volunteer
Posts: 2781
Joined: Wed Mar 09, 2016 2:40 pm

Re: {Solved] Prob with "ExtensionCompiler.ott" (2.1.2)

Post by JeJe »

Works for me in LibreOffice 7 as well.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
reinralle
Posts: 4
Joined: Sun Oct 11, 2020 9:39 am

Re: {Solved] Prob with "ExtensionCompiler.ott" (2.1.2)

Post by reinralle »

JeJe wrote:Works for me in LibreOffice 7 as well.
strange..maybe i have some changes in my profil/settings that are responsible for this..
Last edited by reinralle on Wed Feb 03, 2021 8:50 pm, edited 3 times in total.
LibreOffice 7.0.4.2 (x64) on Windows 10 (20H2 - Build 19042.782)
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: [Solved] Prob with "ExtensionCompiler.ott" (2.1.2)

Post by Villeroy »

What makes you believe that anything like this could work as a Word document (*.doc)? You could learn a lot more about LibreOffice if you would not start with extension building. Extensions on top of something you don't know is counterproductive.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
reinralle
Posts: 4
Joined: Sun Oct 11, 2020 9:39 am

Re: [Solved] Prob with "ExtensionCompiler.ott" (2.1.2)

Post by reinralle »

Villeroy wrote:What makes you believe that anything like this could work as a Word document (*.doc)? You could learn a lot more about LibreOffice if you would not start with extension building. Extensions on top of something you don't know is counterproductive.
Hallo,

hm, I know Libreoffice/OpenOffice a long time and program a lot (not only LO/AOO). Until now I made only *.bas modules in documents (Writer, Calc, Base) for LO. In the past (years ago) I started some tries to develop extensions for LO, but "by hand". :shock:

I thought: "try it again with another approach: ExtensionCompiler.ott". But all is not so clear as it could :( Sure, did not expect, that the target is an odt File. My temporary problem was, that I could not test the template approach under LO to get an oxt for example. Since trying with AOO all seems OK now.

Yesterday, I still thought, it could be relative easy, to make a nice workflow with "Visual Studio" for creating, debugging, building a LO/AOO Extension (Basic, Python, ..). It seems, that everything still has to be done by hand :crazy: must all learn again and again...a hell for me :alarm: I 'am lazzy and my time is luxurious :D But I give not up and "ExtensionCompiler.ott" a chance. ;-)
 Edit: But in the mean time I could solve the problem with the endless loop! (see my first post
LibreOffice 7.0.4.2 (x64) on Windows 10 (20H2 - Build 19042.782)
Post Reply