private native void myNativeMethod() /*-{
...
var myArrayBuffer = [something that gets an ArrayBuffer);
this.@myPackmage::myNonNativeMethod(Lcom/google/gwt/typedarrays/shared/ArrayBuffer;)(myArrayBuffer);
}-*/
private void myNonNativeMethod(ArrayBuffer buffer) {
Uint8Array uint8Array = TypedArrays.createUint8Array(buffer);
uint8Array.byteLength(); // *** HERE ***
}
Uncaught ReferenceError: $zIb_g$ is not defined
at QHcb_g$.wHcb_g$ [as myNonNativeMethod_1_g$] (app-0.js:1350405:3)
at FileReader.<anonymous> (app-0.js:1350882:25)
ArrayBuffer arrayBuffer = TypedArrays.createArrayBuffer(20);
GWT.log("ab.length = " + arrayBuffer.byteLength());
Uint8Array uintArray = TypedArrays.createUint8Array(arrayBuffer);
GWT.log("uintArray = " + uintArray);
// ---------- THE CALL BELOW FAILS ---------
GWT.log("uintArray[0] " + uintArray.get(0));
Run GWT Code Server: [-launcherDir, C:\home\ws\MYAPP\.metadata\.plugins\org.eclipse.wst.server.core\tmp0/wtpwebapps/MYAPP, -workDir, MYTMPDIR, -logLevel, INFO, -style, DETAILED, -sourceLevel, 17, -port, 9876, -generateJsInteropExports, MYAPPNAME]