diff options
-rw-r--r-- | source/text/sbasic/shared/03/sf_dialogcontrol.xhp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/text/sbasic/shared/03/sf_dialogcontrol.xhp b/source/text/sbasic/shared/03/sf_dialogcontrol.xhp index 642acfeaa8..8ccd4e4218 100644 --- a/source/text/sbasic/shared/03/sf_dialogcontrol.xhp +++ b/source/text/sbasic/shared/03/sf_dialogcontrol.xhp @@ -86,13 +86,13 @@ <tip id="par_id691670857377446">Call <literal>SF_Exception.Clear</literal> if you do not want the error to propagate after the dialog execution ended.</tip> <paragraph role="paragraph" id="par_id741619625211445">In Python use native <literal>try/except</literal> blocks for exception handling as shown below:</paragraph> <pycode> - <paragraph role="pycode" id="pyc_id111670866555779">def on_button_clicked(event=None):</paragraph> - <paragraph role="pycode" id="pyc_id871670866556117"> try:</paragraph> - <paragraph role="pycode" id="pyc_id721670866556311"> oControl = CreateScriptService("DialogEvent", event)</paragraph> + <paragraph role="pycode" localize="false" id="pyc_id111670866555779">def on_button_clicked(event=None):</paragraph> + <paragraph role="pycode" localize="false" id="pyc_id871670866556117"> try:</paragraph> + <paragraph role="pycode" localize="false" id="pyc_id721670866556311"> oControl = CreateScriptService("DialogEvent", event)</paragraph> <paragraph role="pycode" id="pyc_id491670866556493"> # Process the event</paragraph> - <paragraph role="pycode" id="pyc_id521670866556680"> except Exception as e:</paragraph> + <paragraph role="pycode" localize="false" id="pyc_id521670866556680"> except Exception as e:</paragraph> <paragraph role="pycode" id="pyc_id416708660557072"> # The object "bas" below is an instance of the Basic service</paragraph> - <paragraph role="pycode" id="pyc_id491670866556877"> bas.MsgBox(str(e))</paragraph> + <paragraph role="pycode" localize="false" id="pyc_id491670866556877"> bas.MsgBox(str(e))</paragraph> </pycode> <h2 id="hd_id71598455687512" xml-lang="en-US">Control types</h2> <paragraph role="paragraph" id="par_id851598455863395" xml-lang="en-US">The <literal>DialogControl</literal> service is available for these control types:</paragraph> |