onPanelEvent
Description
Observable field that emits panel-specific events from the SDK.
Type
assocArray
Usage
m.lib.observeField("onPanelEvent", "onPanelEvent")
function onPanelEvent(event as Object)
eventData = event.getData()
print "Panel event received: " + formatJson(eventData)
end function
Data Structure
The structure of the event data depends on the specific panel and event type. Common fields include:
| Field | Type | Description |
|---|---|---|
eventType | string | Type of event that occurred |
panelName | string | Name of the panel that emitted |
data | object | Event-specific data |
Best Practices
- Monitor all panel events to understand user interactions
- Implement proper error handling for event data
- Use event types to route to appropriate handlers
- Log events for debugging and analytics