LibreOffice Module wizards (master) 1
Public Member Functions | List of all members
access2base._A2B Class Reference
Inheritance diagram for access2base._A2B:
[legend]
Collaboration diagram for access2base._A2B:
[legend]

Public Member Functions

def BasicObject (cls, objectname)
 
def xScript (cls, script, module)
 
def A2BErrorCode (cls)
 
def invokeMethod (cls, script, module, *args)
 
def invokeWrapper (cls, action, basic, script, *args)
 
def VerifyNoError (cls)
 
- Public Member Functions inherited from access2base._Singleton
def __call__ (cls, *args, **kwargs)
 

Additional Inherited Members

- Static Public Attributes inherited from access2base._Singleton
dictionary instances = {}
 

Detailed Description

Collection of helper functions implementing the protocol between Python and Basic
    Read comments in PythonWrapper Basic function

Definition at line 527 of file access2base.py.

Member Function Documentation

◆ A2BErrorCode()

def access2base._A2B.A2BErrorCode (   cls)
Return the Access2Base error stack as a tuple
    0 => error code
    1 => severity level
    2 => short error message
    3 => long error message

Definition at line 586 of file access2base.py.

References access2base._A2B.xScript().

Referenced by access2base._A2B.VerifyNoError().

◆ BasicObject()

def access2base._A2B.BasicObject (   cls,
  objectname 
)

Definition at line 534 of file access2base.py.

Referenced by access2base._A2B.invokeWrapper().

◆ invokeMethod()

def access2base._A2B.invokeMethod (   cls,
  script,
  module,
args 
)
Direct call to a named script/module pair with their arguments
If the arguments do not match their definition at the Basic side, a TypeError is raised
:param script: name of script
:param module: name of module
:param args: list of arguments to be passed to the script
:return: the value returned by the script execution

Definition at line 598 of file access2base.py.

References access2base.A2BConnect(), access2base._A2B.VerifyNoError(), and access2base._A2B.xScript().

◆ invokeWrapper()

def access2base._A2B.invokeWrapper (   cls,
  action,
  basic,
  script,
args 
)
Call the Basic wrapper to invite it to execute the proposed action on a Basic object
If the arguments do not match their definition at the Basic side, a TypeError is raised
After execution, a check is done if the execution has raised an error within Basic
    If yes, a TypeError is raised
:param action: Property Get, Property Let, Property Set, invoke Method or return UNO object
:param basic: the reference of the Basic object, i.e. the index in the array caching the addresses of the objects
                conventionally Application = -1 and DoCmd = -2
:param script: the property or method name
:param args: the arguments of the method, if any
:return: the value returned by the execution of the Basic routine

Definition at line 619 of file access2base.py.

References access2base.A2BConnect(), access2base._A2B.BasicObject(), access2base._A2B.VerifyNoError(), and access2base._A2B.xScript().

◆ VerifyNoError()

def access2base._A2B.VerifyNoError (   cls)

◆ xScript()

def access2base._A2B.xScript (   cls,
  script,
  module 
)
At first call checks the existence of the Access2Base library
Initializes _LIBRARY with the found library name
First and next calls execute the given script in the given module of the _LIBRARY library
The script and module are presumed to exist
:param script: name of script
:param module: name of module
:return: the script object. NB: the execution is done with the invoke() method applied on the returned object

Definition at line 556 of file access2base.py.

Referenced by access2base._A2B.A2BErrorCode(), access2base._A2B.invokeMethod(), and access2base._A2B.invokeWrapper().


The documentation for this class was generated from the following file: