Android Question Strange error at compile time

LucaMs

Expert
Licensed User
Longtime User
It seems to be related to the Scale module, but I'm using always the same version.
In other projects I don't get this error; this one contains a HorizontalScrollView

Parsing code. 0.03
Compiling code. 0.05
Compiling layouts code. 0.02
Generating R file. 0.12
Compiling generated Java code. Error
B4A line: 402
If IsPanel(act) AND FirstTime = True Then
javac 1.6.0_43
src\lm\hsv\scale.java:353: inconvertible types
found : java.lang.Class<capture#181 of ?>
required: android.view.View
if (_ispanel(_ba,(anywheresoftware.b4a.objects.ConcreteViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.ConcreteViewWrapper(), (android.view.View)(mostCurrent._act.getObject()))) && _firsttime==anywheresoftware.b4a.keywords.Common.True) {
^
1 error


[P.S. now i'm sure: it is related to HorizontalScrollViews]
 

klaus

Expert
Licensed User
Longtime User
Change the routine ScaleAllDS like this:
B4X:
Public Sub ScaleAllDS(pnl As Panel, FirstTime As Boolean)
    Dim I As Int
   
    ' test if the activity object is a Panel
    If IsPanel(pnl) AND FirstTime = True Then
        ' if yes scale it
        ScaleViewDS(pnl)
    Else
        For I = 0 To pnl.NumberOfViews - 1
            Dim v As View
            v = pnl.GetView(I)
            ScaleViewDS(v)
        Next
    End If
End Sub
Replace Act As Activity by pnl As Panel
and Act by pnl
 
Upvote 0
Top