"gwt-2.4.0/doc/helpInfo/jsoRestrictions.html" comes with GWT distribution. 
So far best readable document on the topic. However, a bit of 
disappointment. b/c It implies I can not implement callbacks in a neat way 
and in general.

The example you pointed me two days ago is no more relevat, since it breaks 
all the RULES.
https://code.google.com/p/gwt-in-the-air/source/browse/trunk/src/net/ltgt/gwt/browserplus/core/client/BrowserPlus.java#145
 

>From gwt-2.4.0/doc/helpInfo/jsoRestrictions.html:

4. JSO classes cannot have instance fields. -- this is waht callbacks are 
about.

2. An interface type may be implemented by at most one JSO subtype. -- this 
excludes possibility of having a general interface for callbacks

What this implies is that anythig more complex in JSNI boils down to 
TRAMPOLINE METHODS. Ugly. A lots of boilerplate code. 
The otherwise "closured" instance fileds (See 4. above) now have to be 
static Java fileds on the trapoline. (Trampoline is not very 
flexible/dynamic thing indeed) 


Dne pátek, 8. června 2012 9:57:09 UTC+2 Thomas Broyer napsal(a):
>
>
>
> On Friday, June 8, 2012 12:54:48 AM UTC+2, zorro wrote:
>>
>> Regarding callbacks there is one more error I am getting:
>> Only one JavaScriptObject type may implement the methods of an interface 
>> that declared methods.
>>
>> This
>> gwt-2.4.0/doc/helpInfo/jsoRestrictions.html
>> explains alot. But why nobody tell me that in the past? I mean tutorials, 
>> talks?
>>
>>
> You mean 
> https://developers.google.com/web-toolkit/doc/latest/DevGuideCodingBasicsOverlay
>  ?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/M1YX8ISGOhcJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to