Thanks, now makes sense. I get confused with the JsFunction JsType(native) 
because elemental2 has some callbacks as JsFunction and others as 
JsType(native), now an actual elemental2 question; what criteria is used to 
apply JsFunction (ex. elemental2.Node.AddEventListenerCallback) instead of 
JsType (ex. elemental2.JsType)?

On Friday, July 1, 2016 at 10:33:22 AM UTC+2, Goktug Gokdogan wrote:
>
>
>
> On Thu, Jun 30, 2016 at 11:42 PM, Ignacio Baca Moreno-Torres <
> [email protected] <javascript:>> wrote:
>
>> Yep, not sure why... but I just try again and the parameter is used 
>> correctly by the codeserver, so it works as you said. When you said 'you 
>> are implementing a native JsType' you are talking about the JsFunction 
>> callbacks, isn't it?
>>
>
> No, I'm talking about JsType(isNative=true). The lambda in your code 
> implements EventListener which is a native JsType interface; not a 
> JsFunction.
>
>  
>
>> The issue said 'do not honor' so looks like the opposite direction (I 
>> mean, 'do not honor' is what is happening before issue is fixed or what 
>> should happen after the issue is fixed).
>>
>
> Yes, the patch description is not accurate. It stops honoring non-native 
> JsType names in SDM to detect missing flag early on. In addition to that, 
> it also makes sure that if you are implementing  a native JsType, it works 
> with or without the flag. The description doesn't capture this part.
>  
>
>> To confirm, will this issue make this native JsFunction callbacks works 
>> without the export flag?
>>
>>
> JsFunction implementations already work with or without the flag. The 
> patch will also make sure native JsType implementations to work with or 
> without the flag.
> So if you are using elemental, you won't need the flag (more common).
> If you are exporting a Java API to be used by some JavaScript, you will 
> need the flag (less common).
>
>  
>
>> On Friday, July 1, 2016 at 12:16:34 AM UTC+2, Goktug Gokdogan wrote:
>>>
>>> You are probably missing the flag.
>>> In this particular situation you are implementing a native JsType and 
>>> that is considered a form exporting in current compiler and hence affected 
>>> by the flag. I know that is surprising and it will be fixed in 
>>> https://gwt-review.googlesource.com/#/c/15193/ (which will be submitted 
>>> before the final release).
>>>
>>> On Thu, Jun 30, 2016 at 3:03 PM, Ignacio Baca Moreno-Torres <
>>> [email protected]> wrote:
>>>
>>>> I just applied elemental2 to this simple drang&drop and FileReader 
>>>> showcase (
>>>> https://github.com/ibaca/dndfiles-gwt/blob/master/src/main/java/dndfiles/client/DndFiles.java).
>>>>  
>>>> Elemental2 looks good, but I think that JsInterop still a bit... 
>>>> unpredictable. The project compiles correctly, but the codeserver fails, 
>>>> pruning/ignoring some methods. Or maybe I do not set the 
>>>> generateJsInteropExports correctly... not sure, but even if this is the 
>>>> problem, I'm still confusing why I need this flag if I'm not exporting 
>>>> anything. If I do not set this flag, the project do not work (some lambdas 
>>>> are pruned).
>>>>
>>>> On Thursday, June 30, 2016 at 8:21:55 PM UTC+2, Ray Cromwell wrote:
>>>>>
>>>>> should be able to make this a little tighter: 
>>>>>
>>>>> button.addEventListener("click", (evt) -> { 
>>>>> button.parentNode.removeChild(button); alert("Button has been 
>>>>> removed."); }); 
>>>>>
>>>>> :) 
>>>>>
>>>>>
>>>>> On Thu, Jun 30, 2016 at 4:16 AM, Julien Dramaix 
>>>>> <[email protected]> wrote: 
>>>>> > I'll try to find some time next week for uploading examples on my 
>>>>> github 
>>>>> > account. 
>>>>> > 
>>>>> > A simple example could be: 
>>>>> > 
>>>>> > package elemental.sample.simple; 
>>>>> > 
>>>>> > import static elemental2.Global.alert; 
>>>>> > import static elemental2.Global.document; 
>>>>> > 
>>>>> > import com.google.gwt.core.client.EntryPoint; 
>>>>> > 
>>>>> > import elemental2.Event; 
>>>>> > import elemental2.EventListener; 
>>>>> > import elemental2.HTMLButtonElement; 
>>>>> > 
>>>>> > public class SimpleApp implements EntryPoint{ 
>>>>> >   public void onModuleLoad() { 
>>>>> >     final HTMLButtonElement button = (HTMLButtonElement) 
>>>>> > document.createElement("button"); 
>>>>> >     button.textContent = "Click me"; 
>>>>> >     button.addEventListener( 
>>>>> >         "click", 
>>>>> >         new EventListener() { 
>>>>> >           @Override 
>>>>> >           public void handleEvent(Event evt) { 
>>>>> >             button.parentNode.removeChild(button); 
>>>>> >             alert("Button has been removed."); 
>>>>> >           } 
>>>>> >         }); 
>>>>> >     document.body.appendChild(button); 
>>>>> >   } 
>>>>> > } 
>>>>> > 
>>>>> > Elemental2.Global can be considered as the entry point of the 
>>>>> library. It 
>>>>> > gathers all methods/fields available from the global scope (but not 
>>>>> the 
>>>>> > window API). 
>>>>> > 
>>>>> > On Thu, Jun 30, 2016 at 12:15 PM Matic Petek <[email protected]> 
>>>>> wrote: 
>>>>> >> 
>>>>> >> Hi, 
>>>>> >>   I would be nice If you could publish simple example how to start 
>>>>> using 
>>>>> >> it. 
>>>>> >> Regards, 
>>>>> >>    Matic 
>>>>> >> 
>>>>> >> On Thursday, June 30, 2016 at 2:23:51 AM UTC+2, Julien Dramaix 
>>>>> wrote: 
>>>>> >>> 
>>>>> >>> A new experimental version of Elemental2 using the new JsInterop 
>>>>> >>> specification has been pushed on Sonatype today. 
>>>>> >>> 
>>>>> >>> 
>>>>> >>> You can try it by downloading the jar file or adding this 
>>>>> following maven 
>>>>> >>> dependency: 
>>>>> >>> 
>>>>> >>> 
>>>>> >>> <dependency> 
>>>>> >>> 
>>>>> >>>  <groupId>com.google.gwt</groupId> 
>>>>> >>> 
>>>>> >>>  <artifactId>elemental2-experimental</artifactId> 
>>>>> >>> 
>>>>> >>>  <version>16-06-30</version> 
>>>>> >>> 
>>>>> >>> </dependency> 
>>>>> >>> 
>>>>> >>> 
>>>>> >>> Then, inherits the elemental2 module: 
>>>>> >>> 
>>>>> >>> 
>>>>> >>> <inherits name="elemental2" /> 
>>>>> >>> 
>>>>> >>> 
>>>>> >>> This experimental version works only with the last 2.8-snapshot 
>>>>> release 
>>>>> >>> of GWT. 
>>>>> >>> 
>>>>> >>> 
>>>>> >>> The goal of this release is to get feedback so don’t hesitate to 
>>>>> report 
>>>>> >>> any bugs, issues, concerns you have on this mailing list. 
>>>>> >>> 
>>>>> >>> 
>>>>> >>> Important note: This is an experimental release and without doubt 
>>>>> the 
>>>>> >>> future updates until the final release are going to break code! 
>>>>> >>> 
>>>>> >>> 
>>>>> >>> - Julien 
>>>>> >>> 
>>>>> >>> 
>>>>> >> -- 
>>>>> >> You received this message because you are subscribed to the Google 
>>>>> Groups 
>>>>> >> "GWT Contributors" group. 
>>>>> >> To unsubscribe from this group and stop receiving emails from it, 
>>>>> send an 
>>>>> >> email to 
>>>>> [email protected]. 
>>>>> >> To view this discussion on the web visit 
>>>>> >> 
>>>>> https://groups.google.com/d/msgid/google-web-toolkit-contributors/01963a7c-7972-4fd9-88ef-629d0a7bcbac%40googlegroups.com.
>>>>>  
>>>>>
>>>>> >> For more options, visit https://groups.google.com/d/optout. 
>>>>> > 
>>>>> > -- 
>>>>> > You received this message because you are subscribed to the Google 
>>>>> Groups 
>>>>> > "GWT Contributors" group. 
>>>>> > To unsubscribe from this group and stop receiving emails from it, 
>>>>> send an 
>>>>> > email to 
>>>>> [email protected]. 
>>>>> > To view this discussion on the web visit 
>>>>> > 
>>>>> https://groups.google.com/d/msgid/google-web-toolkit-contributors/CABb_3%3D5M5DQS--awYZ1bS8nHBu9po8Ne8JPY_ianrUjNZrSqyg%40mail.gmail.com.
>>>>>  
>>>>>
>>>>> > 
>>>>> > For more options, visit https://groups.google.com/d/optout. 
>>>>>
>>>> -- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "GWT Contributors" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to 
>>>> [email protected].
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/google-web-toolkit-contributors/08b1f7b2-3682-4c83-977d-79c729cc2796%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/google-web-toolkit-contributors/08b1f7b2-3682-4c83-977d-79c729cc2796%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "GWT Contributors" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] 
>> <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/google-web-toolkit-contributors/e885d86d-cb93-4f4e-a086-f0e2ea803d27%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/google-web-toolkit-contributors/e885d86d-cb93-4f4e-a086-f0e2ea803d27%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/f3ee495b-544e-4986-9b1c-9adbe2ab2a88%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to