iOS Question Error when compile the app

Lucas Eduardo

Active Member
Licensed User
Hello, i use this code from Erel's post https://www.b4x.com/android/forum/t...ange-selected-label-color.118088/#post-739300
B4X:
Dim sf As Object = Dialog.ShowTemplate(ListTemplate, "OK", "", "CANCEL")
For Each i As Int In Array(xui.DialogResponse_Positive, xui.DialogResponse_Cancel)
    Dim b As B4XView = Dialog.GetButton(i)
    b.Top = b.Top + 10dip
    b.Height = 30dip
Next
Wait For (sf) Complete (Result As Int)

But now when i try to compile the app i get this error
B4X:
B4i Version: 6.50
Parsing code.    (0.65s)
Building folders structure.    (0.07s)
Compiling code.    (1.03s)
Compiling layouts code.    (0.10s)
Compiling debugger engine code.    Error
shell\src\b4i\ibrew\b4i_principalcervejaria_subs_0.java:27962: error: incompatible types: RemoteObject cannot be converted to int
_i = BA.numberCast(int.class, group16.runMethod(true,"Get:",index16));Debug.locals.put("i", _i);}
                  ^
1 error

javac 11.0.1

I figure out that it's this part of the code, but i don't know how to solve it
B4X:
For Each i As Int In Array(xui.DialogResponse_Positive, xui.DialogResponse_Cancel)

Can someone help me?

Thank you.
 

Semen Matusovskiy

Well-Known Member
Licensed User
Create a new project. Add iXUI and XUI Views libraries.

Insert somewhere declarations
B4X:
    Dim Dialog As B4XDialog
    Dim ListTemplate As B4XListTemplate
    Dim xui As XUI

and Erel's code. Compile. If nothing wrong with libraries, compilation will be successful.
So, you need to search a problem in own code.
 
Upvote 0
Top