@Cristian I did not get what you say. Will this be part of GWT 2.7 release?
Am Dienstag, 4. November 2014 13:56:46 UTC+1 schrieb Cristian Rinaldi: > > @Goktug: > This news is great !!! > The issue of the overload was something he had already asked in another > thread, it's good to read that will be supported. > > Thank you ... > > El martes, 4 de noviembre de 2014 08:40:15 UTC-3, Joost Gustavson escribió: >> >> +1 same here. Hope this get solved in GWT 2.7 RC2. >> >> Joost >> >> >> >> On Tuesday, November 4, 2014 12:15:10 AM UTC+1, Goktug Gokdogan wrote: >>> >>> Method overloading is supposed to be ok if there is no prototype is >>> given, however in your case prototype is provided hence even if we fix it, >>> it will not work for your case. >>> >>> There two ways to cover your use case here. One is making var-args work >>> (if it is not already working) so that you can do something like following >>> to cover both in single method: >>> >>> boolean draggable(Object... args) >>> >>> You can give it a try and see if works (but I doubt it will work right >>> now). >>> >>> The second way is to support overloading. We already decided to support >>> overloading at least based on number of arguments and this scenario is >>> covered under that. >>> >>> However we don't have an ETA for this and 2.7 is already at RC1 so you >>> need to wait for the next release. >>> >>> On Mon, Nov 3, 2014 at 1:27 PM, confile <[email protected]> >>> wrote: >>> >>>> Will the custom names method be part of the GWT 2.7 release? That would >>>> be great. I think with this method you can handle nearly everything with >>>> JsInterop. >>>> >>>> When I tried the above JsType as Interface I get the following error: >>>> >>>> GET /recompile/mobilePhoneGapIOS >>>> Job test.mobile.MobilePhoneGapIOS_1_6 >>>> starting job: test.mobile.MobilePhoneGapIOS_1_6 >>>> binding: mgwt.density=xhigh >>>> Compiling module test.mobile.MobilePhoneGapIOS >>>> Ignored 1 unit with compilation errors in first pass. >>>> Compile with -strict or with -logLevel set to TRACE or DEBUG to see all >>>> errors. >>>> Tracing compile failure path for type >>>> 'org.test.kinetic.client.KNode' >>>> [ERROR] Errors in >>>> 'file:/Users/mg/Documents/Grails/GGTS3.5.1Test/test/src/gwt/org/test/kinetic/client/KNode.java' >>>> [ERROR] Line 22: JsType methods cannot overload another >>>> method. >>>> [ERROR] Errors in >>>> 'file:/Users/mg/Documents/Grails/GGTS3.5.1Test/test/src/gwt/org/test/kinetic/client/events/KNodeEventCallbackJSO.java' >>>> [ERROR] org.test.kinetic.client.events.KNodeEvent cannot >>>> be resolved to a type >>>> [ERROR] Errors in >>>> 'file:/Users/mg/Documents/Grails/GGTS3.5.1Test/test/src/gwt/org/test/kinetic/client/events/KNodeEvent.java' >>>> [ERROR] org.test.kinetic.client.KShape cannot be >>>> resolved to a type >>>> [ERROR] Errors in >>>> 'file:/Users/mg/Documents/Grails/GGTS3.5.1Test/test/src/gwt/org/test/kinetic/client/KShape.java' >>>> [ERROR] org.test.kinetic.client.KNode cannot be resolved >>>> to a type >>>> Computing all possible rebind results for >>>> 'test.mobile.client.app.photoEditor.PhotoEditor.Resources' >>>> Rebinding >>>> test.mobile.client.app.photoEditor.PhotoEditor.Resources >>>> Checking rule <generate-with >>>> class='com.googlecode.gwtphonegap.server.log.rebind.PhoneGapLogThresholdGenerator'/> >>>> [ERROR] Hint: Check the inheritance chain from your >>>> module; it may not be inheriting a required module or a module may not be >>>> adding its source path entries properly >>>> [ERROR] Errors in >>>> 'test/mobile/client/app/photoEditor/PhotoEditor.java' >>>> [ERROR] Line 67: Failed to resolve >>>> 'test.mobile.client.app.photoEditor.PhotoEditor.Resources' via deferred >>>> binding >>>> Unification traversed 510 fields and methods and 343 types. 15 >>>> are considered part of the current module and 15 had all of their fields >>>> and methods traversed. >>>> [WARN] Some stale types ([org.test.kinetic.client.KNode]) were >>>> not reprocessed as was expected. This is either a compiler bug or a >>>> Generator has legitimately stopped creating these types. >>>> [ERROR] Compiler returned false >>>> [WARN] recompile failed >>>> [WARN] continuing to serve previous version >>>> >>>> >>>> >>>> Michael >>>> >>>> >>>> >>>> Am Montag, 3. November 2014 20:00:29 UTC+1 schrieb Goktug Gokdogan: >>>>> >>>>> There is going to be a JsMethod to provide custom names to the method >>>>> so that you can name the method as abc() and map it to xyx() in the js. >>>>> >>>>> But before that I didn't understand why it doesn't work out of the >>>>> box. You are not overloading based on return type; one of the methods has >>>>> an argument and the other one doesn't have any? >>>>> >>>>> On Mon, Nov 3, 2014 at 1:13 AM, confile <[email protected]> >>>>> wrote: >>>>> >>>>>> Consider the following JavaScript functions: >>>>>> >>>>>> >>>>>> // get draggable flag >>>>>> var draggable = node.draggable(); >>>>>> >>>>>> // enable drag and drop >>>>>> node.draggable(true); >>>>>> >>>>>> >>>>>> >>>>>> I do not see how I can modle them in JsInterop. The following would >>>>>> not work: >>>>>> >>>>>> @JsType(prototype = "$wnd.Kinetic.Node") >>>>>> >>>>>> public interface KNode { >>>>>> >>>>>> void draggable(boolean value); >>>>>> >>>>>> boolean draggable(); >>>>>> >>>>>> } >>>>>> >>>>>> The former would not work because overlaying in Java based on return >>>>>> type is forbidden. I also could not use @JsProperty because the getter >>>>>> and >>>>>> setter are JavaScript functions. >>>>>> >>>>>> Is there another way to deal with this in JsInterop? >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> 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 google-web-toolkit-contributors+unsubscribe@ >>>>>> googlegroups.com. >>>>>> To view this discussion on the web visit https://groups.google.com/d/ >>>>>> msgid/google-web-toolkit-contributors/862d9a24-3a07- >>>>>> 4181-9cc0-17b7a26401ee%40googlegroups.com >>>>>> <https://groups.google.com/d/msgid/google-web-toolkit-contributors/862d9a24-3a07-4181-9cc0-17b7a26401ee%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/6dfbc8e7-9997-4918-aeb3-befea70bd9d2%40googlegroups.com >>>> >>>> <https://groups.google.com/d/msgid/google-web-toolkit-contributors/6dfbc8e7-9997-4918-aeb3-befea70bd9d2%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/3dc3851d-77e0-4362-8c9e-607969141a48%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
