Hi there!
I need to create events from inline java code from a wrapper i am doing.
I am not familiar with JAVA and there is no proper documentation available
this inline java is part of a B4A class module
I need to call, preferable in the same class module a event passing a string;
the way it is now I get:
I have tried:
and give me this error:
and some other variances, what is the proper way to call for event from the inline jave from class module ?
I need to create events from inline java code from a wrapper i am doing.
I am not familiar with JAVA and there is no proper documentation available
B4X:
@Override
public void onTransactionDone(HashMap<String, String> hashMap) {
BA.Log("Transaction.onTransactionDone ");
switch(getTransactionType()) {
case ativacao:
BA.Log("Transaction.onTransactionDone ATIVACAO");
// hashMap vem vazio para ATIVACAO
break;
case comprovante:
BA.Log("Transaction.onTransactionDone COMPROVANTE");
// hashMap vem com comprovantes
comprovanteEstabelecimento = hashMap.get("via_estabelecimento");
BA.raiseEvent(this, "yNexu_Comprovante", comprovanteEstabelecimento);
this inline java is part of a B4A class module
I need to call, preferable in the same class module a event passing a string;
the way it is now I get:
B4X:
src\yashar\yTEF\ynexu.java:374: error: non-static method raiseEventFromUI(Object,String,Object...) cannot be referenced from a static context
BA.raiseEventFromUI(this, "yNexu_Comprovante", comprovanteEstabelecimento);
I have tried:
B4X:
BA ba = (BA) this.getClass().getField("processBA").get(null);
ba.raiseEvent(this, "yNexu_Comprovante", comprovanteEstabelecimento);
and give me this error:
B4X:
src\yashar\yTEF\ynexu.java:374: error: unreported exception NoSuchFieldException; must be caught or declared to be thrown
BA ba = (BA) this.getClass().getField("processBA").get(null);
^
and some other variances, what is the proper way to call for event from the inline jave from class module ?