You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have downloaded this project to use in my app. And I have found out that
events(onLoad, onComplete and onError) are not working properly. Java methods
are not invoked.
After debugging, I have found the problem and here is the fix:
In WebcamImpl.java file change private native JavaScriptObject create**
methods to the following code:
private native JavaScriptObject createOnErrorHook() /*-{
var _this = this;
return function(result) {
_this.@com.logikas.gwt.webcam.client.WebcamImpl::fireErrorEvent(Ljava/lang/String;)(result);
};
}-*/;
private native JavaScriptObject createOnLoadHook() /*-{
var _this = this;
return function() {
_this.@com.logikas.gwt.webcam.client.WebcamImpl::fireLoadEvent()();
};
}-*/;
private native JavaScriptObject createOnCompleteHook() /*-{
var _this = this;
return function(result) {
_this.@com.logikas.gwt.webcam.client.WebcamImpl::fireCompleteEvent(Ljava/lang/String;)(result);
};
}-*/;
The problem was that during event, this object was different from the moment of
function creation. Therefore it was needed to store an exact object, for which
the function would be invoked.
Original issue reported on code.google.com by guerrill...@gmail.com on 13 Nov 2013 at 2:14
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
guerrill...@gmail.com
on 13 Nov 2013 at 2:14The text was updated successfully, but these errors were encountered: