>From the console of the web browser: What is it required to create a new
ArrayBuffer?

For example is this enough?
> new $wnd.ArrayBuffer();

or something else is required - such as
> new $wnd.package1.package2.ArrayBuffer();

or maybe it is
> new $wnd.package1.package2.array_buffer();

The answers to these questions will show what you need to put in
'namespace' argument and what in 'name'.

Hope that helps





On Mon, Aug 21, 2017 at 3:39 PM, Kirill Prazdnikov <[email protected]>
wrote:

> Ok, according to the doc, the name:
>
>>  Customizes the name of the type in generated JavaScript. If not
>> provided, the simple Java name will be used.
>
>
> That means that for my case
>
> @JsType(isNative = true, namespace = JsPackage.GLOBAL)
>> public abstract class ArrayBuffer { ... }
>
>
> This is equvavlent to (name = "ArrayBuffer"). Which was suggested above.
> Right ?
>
> I tried the following without any success:
>
>> @JsType(isNative = true, namespace = JsPackage.GLOBAL, name =
>> "ArrayBuffer")
>
>
> JavaScriptObject jsType is stil null and checkcast failed.
>
> But this works:
>
> @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
>
>
> In that case GWT calls castToJsObject, which does not do type checking,
> instead of castToNative. castToNative does type checks.
>
> However I still don`t think that name="Object" is correct for native
> ArrayBuffer.
> If I understand JsInterop correctly, when want to call a @JsConstructor
> form java I must assign a proper name, right ?
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Vassilis Virvilis

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to