On Thu, Aug 13, 2009 at 7:46 AM, Nathan Wells <nwwe...@gmail.com> wrote:
> I've been experimenting with GWT.isClient() and GWT.isScript(), but to > no avail. Thus far I've only tried it in hosted mode with 1.7... is > there something I'm missing? > isClient/isScript isn't going to let you include non-translatable code in the client sources or to directly remove fields (they could get removed by virtue of no references remaining to them). Using super-source allows you to write two different implementations for the same class -- one used by the server, and one by the client. Write your server-side code in the same place, and put a super-source entry in your module file pointing at a base directory for the translatable version -- see the doc<http://code.google.com/webtoolkit/doc/1.6/DevGuideOrganizingProjects.html#DevGuideModuleXml>for more info. However, you have to be careful such that the server-side and client-side implementations are compatible for serialization -- you may have to have a custom serializer in order to make that work. -- John A. Tamplin Software Engineer (GWT), Google --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---