https://bugs.documentfoundation.org/show_bug.cgi?id=149983

            Bug ID: 149983
           Summary: ScriptForge Dialog service not returning after
                    EndExecute in Python
           Product: LibreOffice
           Version: 7.3.1.3 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: BASIC
          Assignee: [email protected]
          Reporter: [email protected]

Created attachment 181255
  --> https://bugs.documentfoundation.org/attachment.cgi?id=181255&action=edit
Sample file with scripts

I have a Basic dialog with a "Close" button in it.

Using the SF Dialog service in Basic to display the dialog and then close it
using a callback function also written in Basic works as expected. Below is the
code in Basic that processes the event:

Sub CloseDialog_Basic(oEvent)
    btnControl = CreateScriptService("DialogEvent", oEvent)
    myDialog = btnControl.Parent
    myDialog.EndExecute()
End Sub

However the equivalent code in Python does not work. It seems the code never
exits the EndExecute() call.

def btn_close_click(event=None):
    btn_control = CreateScriptService("DialogEvent", event)
    my_dialog = btn_control.Parent
    my_dialog.EndExecute(0)

There seems to be something holding the interpreter after the EndExecute call.

I attached a file with the scripts in Basic and Python for testing.

System info:

Version: 7.3.4.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 12; OS: Linux 5.15; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: pt-BR
Ubuntu package version: 1:7.3.4-0ubuntu0.22.04.1
Calc: threaded

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to