D Dey Active Member Licensed User Longtime User Jun 7, 2017 #1 Hello to all I have a class with a timer that keeps a table from a server This class is initialized in an activity 1 Step to other activities eg. 2 3 without making 1.Finish Occasionally happens that the pass or return to activity 1 generates this error I think due because activity 1 is paused or pauses How can I fix it? I also put a Try Catch but it is not intercepted Unfortunately and random I can not replicate it ... Thank you Code: j.Release 'For WAIT FOR If SubExists(Me,"TavoloRichiestaSingolo_result") Then 'CallSub2(mCallBack,"AggiornaTavoli_event",st) CallSubDelayed2(Me,"TavoloRichiestaSingolo_result",st) End If Spoiler: Log 0.549 0.625 0.596 An error occurred: (Line: 1874) Return java.lang.Exception: Sub tavolorichiestasingolo_result signature does not match expected signature. public static void BAR.Tablet.cls_tavoli_subs_0._tavolorichiestasingolo_result(anywheresoftware.b4a.pc.RemoteObject) throws java.lang.Exception
Hello to all I have a class with a timer that keeps a table from a server This class is initialized in an activity 1 Step to other activities eg. 2 3 without making 1.Finish Occasionally happens that the pass or return to activity 1 generates this error I think due because activity 1 is paused or pauses How can I fix it? I also put a Try Catch but it is not intercepted Unfortunately and random I can not replicate it ... Thank you Code: j.Release 'For WAIT FOR If SubExists(Me,"TavoloRichiestaSingolo_result") Then 'CallSub2(mCallBack,"AggiornaTavoli_event",st) CallSubDelayed2(Me,"TavoloRichiestaSingolo_result",st) End If Spoiler: Log 0.549 0.625 0.596 An error occurred: (Line: 1874) Return java.lang.Exception: Sub tavolorichiestasingolo_result signature does not match expected signature. public static void BAR.Tablet.cls_tavoli_subs_0._tavolorichiestasingolo_result(anywheresoftware.b4a.pc.RemoteObject) throws java.lang.Exception
Erel B4X founder Staff member Licensed User Longtime User Jun 8, 2017 #2 Can you post the code of TavoloRichiestaSingolo_result sub? What is st? Upvote 0
D Dey Active Member Licensed User Longtime User Jun 8, 2017 #3 Erel said: Can you post the code of TavoloRichiestaSingolo_result sub? What is st? Click to expand... Code: For n=0 To lstTavAggiorna.Size-1 Dim st As ts_tav 'Type Dim at As t_tavAgg 'Type st=lstTavoliAll.get(n) 'utilizzo tutti i tavoli richiesti at=lstTavAggiorna.Get(n) If at.C12_time_aggiornamento <> st.C12_time_aggiornamento Then 'CE DIFFERENZA st.C12_time_aggiornamento = at.C12_time_aggiornamento TavoloRichiestaSingolo(st.C01_id_tavolo) Wait For TavoloRichiestaSingolo_result(st As ts_tav) If SubExists(mCallBack,"AggiornaTavoli_event") Then CallSubDelayed2(mCallBack,"AggiornaTavoli_event",st) End If Exit End If Next Catch Utility.SaveLog("clsTavoli.AggiornaTavoli ERR: " & CRLF & LastException.Message) End Try Upvote 0
Erel said: Can you post the code of TavoloRichiestaSingolo_result sub? What is st? Click to expand... Code: For n=0 To lstTavAggiorna.Size-1 Dim st As ts_tav 'Type Dim at As t_tavAgg 'Type st=lstTavoliAll.get(n) 'utilizzo tutti i tavoli richiesti at=lstTavAggiorna.Get(n) If at.C12_time_aggiornamento <> st.C12_time_aggiornamento Then 'CE DIFFERENZA st.C12_time_aggiornamento = at.C12_time_aggiornamento TavoloRichiestaSingolo(st.C01_id_tavolo) Wait For TavoloRichiestaSingolo_result(st As ts_tav) If SubExists(mCallBack,"AggiornaTavoli_event") Then CallSubDelayed2(mCallBack,"AggiornaTavoli_event",st) End If Exit End If Next Catch Utility.SaveLog("clsTavoli.AggiornaTavoli ERR: " & CRLF & LastException.Message) End Try
Erel B4X founder Staff member Licensed User Longtime User Jun 8, 2017 #4 What is the signature of this sub (first line)? Upvote 0
D Dey Active Member Licensed User Longtime User Jun 8, 2017 #5 Erel said: What is the signature of this sub (first line)? Click to expand... This is the sub This is the sub The problem may come from the statement Dim st As ts_tav And Wait For Returns the same variable name? Thanks Erel Code: 'Update Tables 'Example: <code> 'Wait For AggiornaTavoli_event(st as ts_tav) '</code> Sub AggiornaTavoli() Try If lstTavoliAll.size <>lstTavAggiorna.Size Then 'Aggiunto o rimosso tavoli SaleRichiesta TavoliRichiestaAll Return End If For n=0 To lstTavAggiorna.Size-1 Dim st As ts_tav Dim at As t_tavAgg st=lstTavoliAll.get(n) 'utilizzo tutti i tavoli richiesti at=lstTavAggiorna.Get(n) If at.C12_time_aggiornamento <> st.C12_time_aggiornamento Then 'CE DIFFERENZA st.C12_time_aggiornamento = at.C12_time_aggiornamento TavoloRichiestaSingolo(st.C01_id_tavolo) Wait For TavoloRichiestaSingolo_result(st As ts_tav) If SubExists(mCallBack,"AggiornaTavoli_event") Then CallSubDelayed2(mCallBack,"AggiornaTavoli_event",st) End If Exit End If Next Catch Utility.SaveLog("clsTavoli.AggiornaTavoli ERR: " & CRLF & LastException.Message) End Try End Sub Upvote 0
Erel said: What is the signature of this sub (first line)? Click to expand... This is the sub This is the sub The problem may come from the statement Dim st As ts_tav And Wait For Returns the same variable name? Thanks Erel Code: 'Update Tables 'Example: <code> 'Wait For AggiornaTavoli_event(st as ts_tav) '</code> Sub AggiornaTavoli() Try If lstTavoliAll.size <>lstTavAggiorna.Size Then 'Aggiunto o rimosso tavoli SaleRichiesta TavoliRichiestaAll Return End If For n=0 To lstTavAggiorna.Size-1 Dim st As ts_tav Dim at As t_tavAgg st=lstTavoliAll.get(n) 'utilizzo tutti i tavoli richiesti at=lstTavAggiorna.Get(n) If at.C12_time_aggiornamento <> st.C12_time_aggiornamento Then 'CE DIFFERENZA st.C12_time_aggiornamento = at.C12_time_aggiornamento TavoloRichiestaSingolo(st.C01_id_tavolo) Wait For TavoloRichiestaSingolo_result(st As ts_tav) If SubExists(mCallBack,"AggiornaTavoli_event") Then CallSubDelayed2(mCallBack,"AggiornaTavoli_event",st) End If Exit End If Next Catch Utility.SaveLog("clsTavoli.AggiornaTavoli ERR: " & CRLF & LastException.Message) End Try End Sub
Erel B4X founder Staff member Licensed User Longtime User Jun 8, 2017 #6 Dey said: Dim st As ts_tav And Wait For Returns the same variable name? Click to expand... It shouldn't matter. Are you sure that there is no sub named TavoloRichiestaSingolo_result? Or another place where you wait for this event? Upvote 0
Dey said: Dim st As ts_tav And Wait For Returns the same variable name? Click to expand... It shouldn't matter. Are you sure that there is no sub named TavoloRichiestaSingolo_result? Or another place where you wait for this event?