[Solved] Endless loop with "ExtensionCompiler.ott"

Discussions about using 3rd party extension with OpenOffice.org

[Solved] Endless loop with "ExtensionCompiler.ott"

Postby reinralle » Tue Feb 02, 2021 3:43 pm

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   Expand viewCollapse view
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)
reinralle
 
Posts: 4
Joined: Sun Oct 11, 2020 9:39 am

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

Postby JeJe » Tue Feb 02, 2021 4:32 pm

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
Openoffice 4.1.6
Windows 8
JeJe
Volunteer
 
Posts: 1531
Joined: Wed Mar 09, 2016 2:40 pm

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

Postby JeJe » Tue Feb 02, 2021 4:34 pm

It goes round in a loop if you click on cancel instead of save.
Openoffice 4.1.6
Windows 8
JeJe
Volunteer
 
Posts: 1531
Joined: Wed Mar 09, 2016 2:40 pm

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

Postby reinralle » Tue Feb 02, 2021 4:54 pm

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)
reinralle
 
Posts: 4
Joined: Sun Oct 11, 2020 9:39 am

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

Postby JeJe » Tue Feb 02, 2021 5:10 pm

Works for me in LibreOffice 7 as well.
Openoffice 4.1.6
Windows 8
JeJe
Volunteer
 
Posts: 1531
Joined: Wed Mar 09, 2016 2:40 pm

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

Postby reinralle » Tue Feb 02, 2021 5:18 pm

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)
reinralle
 
Posts: 4
Joined: Sun Oct 11, 2020 9:39 am

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

Postby Villeroy » Tue Feb 02, 2021 7:10 pm

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
User avatar
Villeroy
Volunteer
 
Posts: 29691
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

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

Postby reinralle » Tue Feb 02, 2021 8:14 pm

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)
reinralle
 
Posts: 4
Joined: Sun Oct 11, 2020 9:39 am


Return to Extensions

Who is online

Users browsing this forum: ggeerits and 2 guests