HiNot sure if anybody is around on this group at the moment...
GWT Exporter currently fails silently if it meets an Exportable class whose public constructor accepts arguments other than a JavaScriptObject.
Two unrelated questions about this:1) Is there a technical reason why can't exportable classes can't have constructors accepting Strings, primitives, other Exportables, and arrays of those?
2) Could we have at least a warning at compile time about this? It would be most helpful (IMO compilation should actually fail because of this).
--
It seems to me also that non-default constructors are not supported. (i.e., currently broken in 2.4.0)
E.g.,@Export@ExportPackage("test")public class Test implements Exportable {public Test(String foo) {}}
Causes the following runtime error.[INFO] [[[TypeError: net.sourceforge.htmlunit.corejs.javascript.Undefined@4300ec4 is not a function, it is undefined.]]]
Similarly, ExportConstructor fails silently. And I found several other bugs while building my own tests. (I don't know if this project is still underdevelopment, but adding some unit tests would be really useful.)
Rich
On Thursday, September 27, 2012 12:15:40 PM UTC-4, Manuel Carrasco Moñino wrote:On Tue, Sep 25, 2012 at 12:50 PM, Douglas Hoskins <douglas...@futureplatforms.com> wrote:
HiNot sure if anybody is around on this group at the moment...Yes, normally I read it periodicallyGWT Exporter currently fails silently if it meets an Exportable class whose public constructor accepts arguments other than a JavaScriptObject.This should work, what it is unsupported in exporter is constructor overloading with the same number of arguments, but you could pass any object as parameter.Two unrelated questions about this:1) Is there a technical reason why can't exportable classes can't have constructors accepting Strings, primitives, other Exportables, and arrays of those?see comment above2) Could we have at least a warning at compile time about this? It would be most helpful (IMO compilation should actually fail because of this).Yes, generator could fail in certain circumstances, but we have not added those assertions.Maybe we could define all the cases where compiler should fail, not only in this case.--
--
Has recibido este mensaje porque estás suscrito al grupo "gwtexporter" de Grupos de Google.
Para anular la suscripción a este grupo y dejar de recibir sus correos electrónicos, envía un correo electrónico a gwtexporter...@googlegroups.com.
Para obtener más opciones, visita https://groups.google.com/groups/opt_out.