'In a Class
#Event: Error (Msg As String)
Sub Class_Globals
Private mCallBack As Object
Private mEvent As String
End Sub
Public Sub Initialize(CallBack As Object, EventName As String)
mCallBack = CallBack
mEvent = EventName
End Sub
'In B4XPage
Sub Class_Globals
Private obj As objClass
End Sub
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.LoadLayout("MainPage")
obj.Initialize(Me, "CustomEventName")
End Sub
Private Sub CustomEventName_Error(Msg As String)
'Error handling
End Sub