I am writing a widget that contains several activities. Several of the activities use the number dialog from the Dialogs library, so I started writing a class to handle building the number dialog in the form that an activity requires.
I get the compile error shown in the attached png when I try the code but it is unclear to me what error message means for me to do to fix the error.
Any help anybody might offer would be appreciated...
I get the compile error shown in the attached png when I try the code but it is unclear to me what error message means for me to do to fix the error.
Any help anybody might offer would be appreciated...
B4X:
'Class module
Sub Class_Globals
Dim ndResult As Double 'result of entry made
Dim ndNum As Double
Dim arg1 As String
End Sub
'Initializes the object. You can add parameters to this method if needed.
Public Sub Initialize
End Sub
Public Sub getNumber()
Private icon As Bitmap
Dim nd As NumberDialog
icon.Initialize(File.DirAssets, "Cat_Eyes_64.png")
Select arg1
Case "mileage"
nd.ShowSign = False
nd.Number = ndNum
nd.Digits = 6
nd.Decimal = 0
ndResult = nd.Show("Enter current mileage...", "Accept", "Cancel", "Clear", icon)
Case "gallons"
nd.ShowSign = False
nd.Number = ndNum
nd.Digits = 5
nd.Decimal = 3
ndResult = nd.Show( "Enter number of gallons pumped...", "Accept", "Cancel", "Clear", icon)
Case "cost"
nd.ShowSign = False
nd.Number = ndNum
nd.Digits = 5
nd.Decimal = 2
ndResult = nd.Show( "Enter amount paid...", "Accept", "Cancel", "Clear", icon)
End Select
Return ndResult
End Sub
Attachments
Last edited: