Ran across an interesting issue yesterday and not sure how to resolve it.
I needed to pass quite a few parameters via a callsub# routine. So I created a class:
I wrote my new functions and it worked quite well.... in debug legacy mode. Switched to release mode and it no longer would actually make the callsub2. The receiving routine was never called. No changes in code.
Any ideas?
I needed to pass quite a few parameters via a callsub# routine. So I created a class:
B4X:
'Class module ArgumentsContainer
Sub Class_Globals
Public argument1 As Object
Public argument2 As Object
Public argument3 As Object
Public argument4 As Object
Public argument5 As Object
End Sub
'Initializes the object. You can add parameters to this method if needed.
Public Sub Initialize
End Sub
Public Sub aCallsub(Component As Object, SubRoutine As String, a1 As Object, a2 As Object, a3 As Object, _
a4 As Object, a5 As Object)
argument1 = a1
argument2 = a2
argument3 = a3
argument4 = a4
argument5 = a5
CallSub2(Component, SubRoutine, me)
End Sub
I wrote my new functions and it worked quite well.... in debug legacy mode. Switched to release mode and it no longer would actually make the callsub2. The receiving routine was never called. No changes in code.
Any ideas?