Page 1 of 1

[Solved] Endless loop with "ExtensionCompiler.ott"

Posted: Tue Feb 02, 2021 3:43 pm
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

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

Posted: Tue Feb 02, 2021 4:32 pm
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

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

Posted: Tue Feb 02, 2021 4:34 pm
by JeJe
It goes round in a loop if you click on cancel instead of save.

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

Posted: Tue Feb 02, 2021 4:54 pm
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.

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

Posted: Tue Feb 02, 2021 5:10 pm
by JeJe
Works for me in LibreOffice 7 as well.

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

Posted: Tue Feb 02, 2021 5:18 pm
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..

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

Posted: Tue Feb 02, 2021 7:10 pm
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.

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

Posted: Tue Feb 02, 2021 8:14 pm
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