It's because they don't support polymorphism with overlay types. The same reason all methods are final and cannot be overridden in sub classes of a JSO.
On Thursday, September 6, 2012 2:22:16 PM UTC-4, Sebastián Gurin wrote: > > Hi all. I'm writing a lot of GWT overlay types for my new project YUIGWT - > http://code.google.com/p/yuigwt/. I'm creating a nice and rich java > hierarchy of overlay types there. > > Today I discovered that it is not good to let overlay types (extends > JavaScriptObject implement interfaces because it seems that for a certain > interface, no more than one overlay type can implement its methods. The > error in question is pasted below, but this arrises a big question for me: > > While I understand perfectly what the error means, I would really > appreciate if somebody can explain me the reasons behind this nasty > restriction ? ?? > > [ERROR] [org.sgx.yuigwt.YuiGwtTestOnline] - Line 9: Only one > JavaScriptObject type may implement the methods of an interface that > declared methods. The interface (org.sgx.yuigwt.yui.yql.api.YQLQueryResult) > is implemented by both (org.sgx.yuigwt.yui.yql.api.desc.DescResult) and > (org.sgx.yuigwt.yui.yql.api.wheather.forecast.WheatherForecastResult) > > Thanks in advance. > -- 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/-/yRfzknalyioJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
