onSDKEvent
The SDK's event channel: every event arrives as { type, payload }, so one observer covers new event types.
Type
assocArray: { type: "<domain>:<name>", payload: { ... } }
Events
rendered:channels
The panel row was built. Fires on every build (config change, userSettings write, restart), and with an empty
panels list when the panel config fails to load or has no panel for this page.
| Payload field | Type | Description |
|---|---|---|
panels | array of strings | The panel types on screen, in tab order. |
eventMetaData | assocArray | The page metadata of each event the panels were built from, by event ID. {} when none. |
Example
m.maestro.observeField("onSDKEvent", "onMaestroSDKEvent")
sub onMaestroSDKEvent(event as object)
sdkEvent = event.getData()
if sdkEvent?.type = "rendered:channels"
m.maestroPanels = sdkEvent.payload?.panels ?? [] ' replace, don't append
end if
end sub
Notes
- Route on the part of
typebefore:(the domain); unknown types are safe to ignore. payloadis always anassocArray.- Mount modules from
panelsBuilt, not from this event.