Some iOS dialogs like ActionSheet need a reference to the Rootpanel of current page. I have this sub in a Dialogs class and would like to do without the first parameter "pnl As Panel". Is there another way to get the Rootpanel of the page from where this function is called?
B4X:
Sub InputListDialog(pnl As Panel, items As List, cancelItem As String, destructiveItem As String, titel As String) As ResumableSub
Dim acSheet As ActionSheet
acSheet.Initialize("sheet", titel, cancelItem, destructiveItem, items)
acSheet.Show(pnl)
Wait For sheet_Click (value As String)
Dim iRes As Int = -1
If value = cancelItem Then
iRes = -1
else if value = destructiveItem Then
iRes = -2
Else
For i = 0 To items.Size - 1
If items.Get(i) = value Then iRes = i
Next
End If
Return iRes
End Sub