-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Bohoej wrote: [...] > I am trying to send Class objects from the server to the client, and > then used GWT.create to make instances of these classes.
You can't do this at all --- GWT.create() is a magic(TM) function that requires a class *literal* as an argument. You can't use it with variables! e.g.: Class<?> c = Fnord.class; Object o = GWT.create(c); /* wrong */ Object o = GWT.create(Fnord.class); /* right */ So your only option is going to be to send a value identifying the class from the server to the client and use something like a big switch statement to generate an object of the right type. - -- David Given [email protected] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqnsO4ACgkQf9E0noFvlzjGLgCgh0b0Q8cx7rFGdgpizZ9iOt+A YkgAnj2k0aZa3DD5LrRSHWPUkqFI7MUP =aRqv -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. 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 -~----------~----~----~----~------~----~------~--~---
