AnyLumino

App

Hold the data of a generated UI and handle its events.

Subclass App with one handler(self, event) method per @Callback handler, and optionally setup(self). A generated UI(app) is the widget; the app works without one, for example to call a handler in a test.

Notes

Set on_error to receive handler exceptions as on_error(handler, error) instead of raising them, and agent to receive ask_agent(message, context) calls.

Attributes

attributeuiAny
= None
attributeagentCallable[[str, Any], None] | None
= None
attributeon_errorCallable[[str, Exception], None] | None
= None

Functions

constructor__init__(**namespace) -> None
paramnamespaceAny
= {}

Returns

None
funcset_ui(ui) -> None

Keep ui as self.ui and run setup; a generated UI(app) calls it.

paramuiAny

Returns

None
funcsetup() -> None

Fill the UI after it is built; override it to load data into widgets.

Returns

None
funccall(handler, *args) -> None

Run the handler method with args, passing an exception to on_error when set.

paramhandlerstr
paramargsAny
= ()

Returns

None
funcask_agent(message, context=None) -> None

Send message to the workbench agent; warns when no agent is attached.

parammessagestr
paramcontextAny
= None

Returns

None

On this page