Skip to main content

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 fieldTypeDescription
panelsarray of stringsThe panel types on screen, in tab order.
eventMetaDataassocArrayThe 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 type before : (the domain); unknown types are safe to ignore.
  • payload is always an assocArray.
  • Mount modules from panelsBuilt, not from this event.