Translation

python_dialogs.xhp N0339 help.text
English pcUEy
Context English Korean Actions
python_2_basic.xhp
N0373
help.text
Examples in <link href="text/sbasic/python/python_screen.xhp" name="Input/Output to Screen">Input/Output to Screen</link> detail Python to Basic invocation calls. <link href="text/sbasic/python/python_document_events.xhp" name="Monitoring Document Events">Monitoring Document Events</link> illustrates the usage of *args Python idiom to print a variable number of parameters to <literal>Access2Base</literal> logging console dialog.
python_2_basic.xhp
N0374
help.text
At time of development you can interrupt Python script execution using <link href="https://berma.pagesperso-orange.fr/index2.html" name="Xray extension">Xray extension</link> in order to inspect properties and methods of UNO objects. The APSO extension debugger allows object introspection using either Xray either MRI extensions.
python_2_basic.xhp
N0378
help.text
Examples of Embedded Scripts in Documents
python_2_basic.xhp
N0379
help.text
<literal>*args</literal>Python simplified syntax can be used in conjunction with %PRODUCTNAME Basic routines that accept a variable number of arguments. Below <literal>Print</literal> and <literal>SUM</literal> Python functions call their Basic <literal>Print</literal> and <literal>SUM</literal> counterparts, using aforementioned <literal>getBasicScript</literal> function. Exception handling is not detailed.
python_2_basic.xhp
N0384
help.text
"""Outputs the specified strings or numeric expressions in a dialog box."""
python_2_basic.xhp
N0389
help.text
"""SUM the specified number expression."""
python_2_basic.xhp
N0402
help.text
The %PRODUCTNAME Basic <literal>Print</literal> and <literal>SUM</literal> document-based routines accept a variable number of arguments. The <literal>Private</literal> or <literal>Public</literal> attributes have no effect. The arguments type checking is skipped for clarity.
python_2_basic.xhp
N0407
help.text
''' Print item list of variable number '''
python_2_basic.xhp
N0408
help.text
' all CStr() convertible args are accepted
python_2_basic.xhp
N0419
help.text
''' SUM a variable list of numbers '''
python_dialogs.xhp
tit
help.text
Opening a Dialog with Python
python_dialogs.xhp
N0334
help.text
<bookmark_value>Python;dialogs</bookmark_value> <bookmark_value>dialog box;Python</bookmark_value> <bookmark_value>dialogs;Python</bookmark_value>
python_dialogs.xhp
N0336
help.text
<variable id="pythondialog"><link href="text/sbasic/python/python_dialogs.xhp" name="command_name">Opening a Dialog with Python</link></variable>
python_dialogs.xhp
N0337
help.text
%PRODUCTNAME static dialogs are created with the <link href="text/sbasic/guide/create_dialog.xhp" name="dialog editor">Dialog editor</link> and are stored in varying places according to their personal (My Macros), shared (Application Macros) or document-embedded nature. In reverse, dynamic dialogs are constructed at runtime, from Basic or Python scripts, or using any other <link href="text/shared/guide/scripting.xhp">%PRODUCTNAME supported language</link> for that matter. Opening static dialogs with Python is illustrated herewith. Exception handling and internationalization are omitted for clarity.
python_dialogs.xhp
N0338
help.text
My Macros or Application Macros dialogs
python_dialogs.xhp
N0339
help.text
The examples below open <literal>Access2Base Trace</literal> console or the imported <literal>TutorialsDialog</literal> dialog with <menuitem>Tools - Macros - Run Macro</menuitem> menu:
python_dialogs.xhp
N0364
help.text
Document embedded dialogs
python_dialogs.xhp
N0365
help.text
The example below opens a newly edited <literal>Dialog1</literal> dialog from a document with <menuitem>Tools - Macros - Run Macro</menuitem> menu:
python_dialogs.xhp
N0370
help.text
""" Display a doc-based dialog """
python_dialogs.xhp
N0381
help.text
Refer to <literal>msgbox.py</literal> in <literal>{installation}/program/</literal> directory for Python dynamic dialog examples.
python_document_events.xhp
tit
help.text
Monitoring Document Events
python_document_events.xhp
N0526
help.text
<bookmark_value>Basic;Monitoring Document Events</bookmark_value> <bookmark_value>Python;Monitoring Document Events</bookmark_value> <bookmark_value>Access2Base;Console</bookmark_value> <bookmark_value>Access2Base;Trace</bookmark_value> <bookmark_value>API;document.DocumentEvent: Monitoring Document Event</bookmark_value> <bookmark_value>API;document.XDocumentEventBroadcaster: Monitoring Document Event</bookmark_value> <bookmark_value>API;document.XDocumentEventListener: Monitoring Document Event</bookmark_value> <bookmark_value>API;lang.EventObject: Monitoring Document Event</bookmark_value>
python_document_events.xhp
N0527
help.text
<variable id="pythonmonitor"><link href="text/sbasic/python/python_document_events.xhp" name="Monitoring Document Events">Listening to Document Events</link></variable>
python_document_events.xhp
par_id641630582314861
help.text
Listening to document events can help in the following situations:
python_document_events.xhp
par_id431630582396327
help.text
Identify a new document at opening time, as opposed to existing ones, and perform a dedicated setup.
python_document_events.xhp
par_id461630582396782
help.text
Control the processing of document save, document copy, print or mailmerge requests.
python_document_events.xhp
par_id631630582394790
help.text
Recalculate table of contents, indexes or table entries of a Writer document when document is going to be closed
python_document_events.xhp
par_id601630582398998
help.text
Import math Python packages before opening a Calc document. Release these packages when the document closes.
python_document_events.xhp
N0528
help.text
Next to <link href="text/sbasic/shared/01040000.xhp" name="assigning macros to events">assigning macros to events</link>, one can monitor events raised by %PRODUCTNAME documents. Application Programming Interface (API) broadcasters are responsible for calling event scripts. Unlike listeners that require to define all supported methods, even if unused, document monitors require only two methods next to hooked event scripts.
python_document_events.xhp
N0529
help.text
Monitoring Document Events
python_document_events.xhp
N0530
help.text
Monitoring is illustrated herewith for Basic and Python languages using object-oriented programming. Assigning <literal>OnLoad</literal> script, to the <menuitem>Open Document</menuitem> event, suffices to initiate and terminate document event monitoring. <menuitem>Tools - Customize</menuitem> menu <menuitem>Events</menuitem> tab is used to assign either scripts.

Loading…

No matching activity found.
Browse all component changes

Glossary

English Korean
Text 텍스트 LibreOffice UI - master

Aquí utilizam la fòrma « tèxte » amb E de sosten.

String information

Context
python_dialogs.xhp
N0339
help.text
Source string description
pcUEy
Source string location
python_dialogs.xhp
String age
a year ago
Source string age
a year ago
Translation file
ko/helpcontent2/source/text/sbasic/python.po, string 50