newbie raiseEvent error
Hi,
I was following the examples of building my own lib. for b4a.
But when i tried to add a raiseEvent i got stuck. Here is what i did...
package anywheresoftware.b4a.sample;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.BA.Events;
import anywheresoftware.b4a.BA.ShortName;
import anywheresoftware.b4a.BA.Version;
@ShortName("Firslib")
@Version(1.00f)
@Events(values={"myevent(test as int)" })
public class Firtlib {
private BA ba;
public int multiply(int x) {
ba.raiseEvent(this, "eventname"+"_myevent", 208);
return x * 2;
}
}
When i call this lib from b4a i receive java.lang.NullpointerException.
Thank you,
Hi,
I was following the examples of building my own lib. for b4a.
But when i tried to add a raiseEvent i got stuck. Here is what i did...
package anywheresoftware.b4a.sample;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.BA.Events;
import anywheresoftware.b4a.BA.ShortName;
import anywheresoftware.b4a.BA.Version;
@ShortName("Firslib")
@Version(1.00f)
@Events(values={"myevent(test as int)" })
public class Firtlib {
private BA ba;
public int multiply(int x) {
ba.raiseEvent(this, "eventname"+"_myevent", 208);
return x * 2;
}
}
When i call this lib from b4a i receive java.lang.NullpointerException.
Thank you,
Last edited: