I'm currently writing B4J with embedded java code.
When I call a method in a B4 class from within java in debug mode I need to provide the reference to the B4J object.
When I do the same in release mode the param can not be provided.
Where is this difference coming from and how to write clear code that can be used in both debug and release mode ?
The code below is part of a B4 Class...
In debug mode:
In release mode:
When I call a method in a B4 class from within java in debug mode I need to provide the reference to the B4J object.
When I do the same in release mode the param can not be provided.
Where is this difference coming from and how to write clear code that can be used in both debug and release mode ?
The code below is part of a B4 Class...
In debug mode:
B4X:
public Sub Demo
Dim obj As JavaObject = Me
obj.RunMethod("StartJava", Null)
End Sub
public Sub CallBack ()
Log ("in CallBack")
End Sub
#if java
public void StartJava {
_callback(this); //NOTICE THE PRESENCE OF THE PARAM !
}
#End If
In release mode:
B4X:
public Sub Demo
Dim obj As JavaObject = Me
obj.RunMethod("StartJava", Null)
End Sub
public Sub CallBack ()
Log ("in CallBack")
End Sub
#if java
public void StartJava {
_callback(); //NOTICE THE ABSENCE OF THE PARAM !
}
#End If