Class DispatchComp
Bases:
_DispatchComp
,NotifyingDispatchPartial
,TypeProviderPartial
,WeakPartial
Class for managing XNotifyingDispatch Component.
Note
This is a Dynamic class that is created at runtime. This means that the class is created at runtime and not defined in the source code. In addition, the class may be created with additional classes implemented.
The Type hints for this class at design time may not be accurate. To check if a class implements a specific interface, use the
isinstance
function oris_supported_interface()
methods which is always available in this class.- Parameters:
component (Any) –
Constructor
- Parameters:
component (Any) – UNO Component that implements
com.sun.star.frame.XNotifyingDispatch
interface.- Return type:
None
Registers a listener of a control for a specific URL at this object to receive status events.
It is only allowed to register URLs for which this XDispatch was explicitly queried. Additional arguments (
#...
or?...
) will be ignored.Note: Notifications can’t be guaranteed! This will be a part of interface XNotifyingDispatch.
- Return type:
None
- Parameters:
control (com.sun.star.frame.XStatusListener) –
url (com.sun.star.util.URL) –
dispatches (executes) a URL
It is only allowed to dispatch URLs for which this XDispatch was explicitly queried. Additional arguments (
#...
or?...
) are allowed.Controlling synchronous or asynchronous mode happens via readonly boolean Flag SynchronMode
By default, and absent any arguments,
SynchronMode
is consideredFalse
and the execution is performed asynchronously (i.e. dispatch() returns immediately, and the action is performed in the background). But when set toTrue
, dispatch() processes the request synchronously- Return type:
None
- Parameters:
url (com.sun.star.util.URL) –
args (PropertyValue) –
Do the same like
XDispatch.dispatch()
but notifies listener in every case.Should be used if result must be known.
The call back
event_data
will contain a UNOcom.sun.star.frame.DispatchResultEvent
struct.- Parameters:
url (URL) – Specifies full parsed URL describes the feature which should be dispatched (executed).
args (PropertyValue, optional) – Optional arguments for this request.
cb (EventArgsCallbackT) – Callback that is invoked when an event is dispatched.
- Return type:
None
Note
The Callback,
cb
, is only a one-time event for each call to this method. If needed you can use the same callback for multiple calls to this method.- Return type:
None
- Parameters:
args (PropertyValue) –
url (com.sun.star.util.URL) –
cb (Any) –
Obsolete unique identifier.
Originally returned a sequence of bytes which, when non-empty, was used as an ID to distinguish unambiguously between two sets of types, for example to realize hashing functionality when the object is introspected. Two objects that returned the same non-empty ID had to return the same set of types in getTypes(). (If a unique ID could not be provided, this method was always allowed to return an empty sequence, though).
- Return type:
ByteSequence
returns a sequence of all types (usually interface types) provided by the object.
- Return type:
Tuple
[Any
,...
]
Queries the weak adapter.
It is important that the adapter must know, but not hold the adapted object. If the adapted object dies, all references to the adapter have to be notified to release the adapter.
- Return type:
XAdapter
unregisters a listener from a control.
- Return type:
None
- Parameters:
Control (com.sun.star.frame.XStatusListener) –
url (com.sun.star.util.URL) –
XNotifyingDispatch Component
- Return type:
XNotifyingDispatch