Android Question I don't understand this error...

Troberg

Well-Known Member
Licensed User
Look at the attached picture. There's a few lines not needed for the error included, but I've narrowed it down to the line the error appears on.

I understand what it proposes and why, but it doesn't work. What should I do???
 

Attachments

Troberg

Well-Known Member
Licensed User
Nope, it's just an unlucky screen rendering of the squiggly line. It's two arguments, separated by a comma (,), not a period (.). The tail of the comma gets lost in the squiggly line.
 

Troberg

Well-Known Member
Licensed User
No library, just my own code.

I think it has something to do with the fact that iPanOSD has a property declared as a Panel. Glob is declared in ProcessGlobals, and somehow, it doesn't like sending an object containing a GUI element as an argument to a call to it then.
 

Troberg

Well-Known Member
Licensed User
I can't see what that CPanOSD type is.
Code below. For some reason, when I copy/paste, some spaces go missing, so if there seems to be a missing space, don't bother, it's just copy/paste error.

B4X:
#Region Comment header
' CurrentVersion:
' Maintainer: Troberg
'Todo
'Currently only a stub
'Future
'...
'Done
'1.0
'...
#End Region
'Class module
Sub Class_Globals
  PrivatepPriorityAsInt = 8
  PrivatepPositionAsString = "Center"
  PrivatepPauseMediaAsBoolean = False
  PrivatepTimeToLiveAsInt = 3000
  PrivatepHostPanelAsPanel
  PrivatepIconAsString
  PrivatepColoringAsInt
End Sub

'Initializes the object. You can add parameters to this method if needed.
Public Sub Initialize
End Sub

Public Sub Setup(HostPanel AsPanel)
  pHostPanel=HostPanel
  pHostPanel.Width = 20%x
  pHostPanel.Height = 20%x
End Sub

#Region Properties
Sub getPriority() AsInt
  ReturnpPriority
End Sub

Sub getPosition() AsString
  ReturnpPosition
End Sub

Sub getPauseMedia() AsBoolean
  ReturnpPauseMedia
End Sub

Sub getTimeToLive() AsInt
  ReturnpTimeToLive
End Sub

Sub getIcon() AsString
  ReturnpIcon
End Sub
Sub setIcon(Value AsString)
  pIcon=Value
End Sub

Sub getHostPanel() AsPanel
  ReturnpHostPanel
End Sub

Sub getColoring() AsInt
  ReturnpColoring
End Sub
Sub setColoring(Value AsInt)
  pColoring=Value
End Sub
#End Region

#Region Methods
Sub ShowOSD(Icon AsString, Coloring AsInt)
  Dim bd AsBitmapDrawable
  bd.Initialize(Main.Glob.Icons.GetResizedIcon(pIcon,pColoring,20%x,20%x))
  pHostPanel.Background = bd
  Main.Glob.MsgHub.MsgSend1(Me, Main, Main.Glob.Messages.MA_ShowPAN, "PAN", Me)
End Sub
#End Region
 
Top