On Tue, Apr 7, 2009 at 9:52 PM, Ian Bambury <[email protected]> wrote:
> Well, I've learnt a couple of things, thanks! >> >> >> Any code you have that access browser stuff (i.e. DOM, events, etc) then >> at some point sends that stuff to the javascript stub which performs the >> actual execution (I believe that's how it goes - although I'm not 100% sure >> on the Java->javascript path). The javascript->java path is always the way >> your Java code executes in hosted mode. >> > > Hosted mode might well do that in part, but not for all of it. Regular > expressions for example seem to work on Java principles in hosted mode and > JS if compiled so I've always tried to keep to expressions which work in > both. > Precisely. That's what I'm saying. In HostedMode the Java code is executed in a regular JVM, so everything is going to have Java semantics. In fact, reflection works in HostedMode like regular Java, which might throw some people when they go to compile their code. One way you could do it is through deferred binding (Java class with your regexps as static strings & then in your gwt.xml simplydo an unconditional class replacement with the Javascript equivalent). This may not be necessary now, but it certainly was in older versions in my > experience - and it's only my experience and what I've picked up on the list > that I'm going by - I haven't delved any deeper. > It's still this way (and will remain so) AFAIK. I learnt a lot just from the off-hand comments the GWT designers make. > > Cheers, > > Ian > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
