B4J Question Debug /Release mode If Code = xui.DialogResponse_Cancel Then xbtn.Req

DALB

Active Member
Licensed User
Hello,

under B4J, I have this message in the window's compiler :
'---------------------------------------------------------------
B4J line: 208
If Code = xui.DialogResponse_Cancel Then xbtn.Req
shell\src\b4j\depenses\b4xdialog_subs_0.java:409: error: method solveBoolean in class RemoteObject cannot be applied to given types;
if (RemoteObject.solveBoolean("=",b4xdialog._code,BA.numberCast(double.class, __ref.getField(false,"_xui" /*RemoteObject*/ ).getField(true,"DialogResponse_Cancel")))) {
^
required: String,RemoteObject[]
found: String,code,RemoteObject
reason: varargs mismatch; code cannot be converted to RemoteObject
1 error
'--------------------------------------------------------------
The app works in Release mode, not in Debug mode.

I see this line which seems to be the point of the error
'--------------------------------------------------------------
If Code = xui.DialogResponse_Cancel Then xbtn.Req
'--------------------------------------------------------------
but the only one xui.DialogResponse I have is

xui.Msgbox2Async:
Dim sf As Object = xui.Msgbox2Async(msg,"UTILISER LA SAISIE EN COURS","Oui","","Non",Null)
    Wait For (sf) Msgbox_Result (Result As Int)
    If Result = xui.DialogResponse_Positive Then
        lblid00.Text=""
    End If

which works finely.

What can I do ?
 

DALB

Active Member
Licensed User
Hello, thanks aeric for answering.

I have only five pages:
Main, B4XMainPage, saisie, liste2 and code.
Only pages 'saisie' and 'liste2' have more than 200 lines,
and at line 208 for these two lines you have :
b4xpage 'saisie' : B4XPages.ShowPage("main")
b4xapge 'liste2' : Case "_Graphiques"

That's all !
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
b4xpage 'saisie' : B4XPages.ShowPage("main")
b4xapge 'liste2' : Case "_Graphiques"

That's all !
i suggest to upload the generated java-file so anyone can have a look at the correct line
 
Upvote 0

DALB

Active Member
Licensed User
what 'code cannot be converted to RemoteObject' means exactly ? because I have no remote object in my code. All the events are treated in each page.
 
Upvote 0

DALB

Active Member
Licensed User
Thanks DonManfred.
I have send the project i na zip file herre.
 

Attachments

  • B4Jdepenses.zip
    141.4 KB · Views: 35
Upvote 0

DALB

Active Member
Licensed User
This is a simulation of expenses.
 
Upvote 0

DALB

Active Member
Licensed User
no, never.
 
Upvote 0

DALB

Active Member
Licensed User
Maybe I'll rebuilt the same app copying the code of each page in new pages of a new app to see if it's not a problem linked to my app.
 
Upvote 0

DALB

Active Member
Licensed User
Now, copying all the pages in a new app, I have the line shown with (==>):

*** liste2: B4XPage_Appear [saisie]
*** saisie: B4XPage_Disappear [liste2]
*** liste2: B4XPage_Resize [liste2]
SELECT * FROM depenses WHERE substr(datev,3,4)= 2501
==> Error occurred on line: 705 (B4XTable)
java.sql.SQLException: [SQLITE_ERROR] SQL error or missing database (near ")": syntax error)
at org.sqlite.DB.newSQLException(DB.java:383)
at org.sqlite.DB.newSQLException(DB.java:387)
at org.sqlite.DB.throwex(DB.java:374).....etc
 
Upvote 0

teddybear

Well-Known Member
Licensed User
Now, copying all the pages in a new app, I have the line shown with (==>):

*** liste2: B4XPage_Appear [saisie]
*** saisie: B4XPage_Disappear [liste2]
*** liste2: B4XPage_Resize [liste2]
SELECT * FROM depenses WHERE substr(datev,3,4)= 2501
==> Error occurred on line: 705 (B4XTable)
java.sql.SQLException: [SQLITE_ERROR] SQL error or missing database (near ")": syntax error)
at org.sqlite.DB.newSQLException(DB.java:383)
at org.sqlite.DB.newSQLException(DB.java:387)
at org.sqlite.DB.throwex(DB.java:374).....etc
You need to rename the code module name(code) to another name. such as code1
 
Upvote 0

DALB

Active Member
Licensed User
Thanks Teddybear. I have deleted it for a while to eliminate the problems.
 
Upvote 0
Top