" Your approach however would make this kind of Java API much more
confortable to Java users "

Is nt it why you are wrapping YUI in the first place ? To make it
confortable for Java users ?


2012/9/7 Sebastián Gurin <sebastigu...@gmail.com>

> Thanks Paul, Nino and Thomas
>
> Paul: yes I suppose that too, but interfaces do not implement methods, so
> I thought it is strange.
>
> Nino: I do not want to make object wrapping as you suggested because I
> want my library user's to use the overlay types directly for a
> zero-overhead API. Your approach however would make this kind of Java API
> much more confortable to Java users.
>
> Thomas, thanks. Yes I'm using .cast() a lot, it is much more confortable
> than java casting. Also I have designed this YUI java API to be the most
> similar to the native javascript API. So code using mine YUIGWT will look
> strange to java programmers, for example, a js literal object definition :
>
> in javascrpt:
>
> var p = {name: "seba", age: 28}
>
> in java:
> Person p = Person.create().name("seba").age(28);
>
>
> On Thursday, September 6, 2012 3:22:16 PM UTC-3, 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/ <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/-/GAl_l1hUSQkJ.
>
> 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.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
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