$doc is GWT's JSNI's variable to access the Javascript document variable - see the documentation: http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5&s=google-web-toolkit-doc-1-5&t=DevGuideJavaScriptFromJava
You don't mention which browsers/operating system you're using, but as far as I know document.selection.createRange is IE only, so I guess you're developing on a Windows system (who's hosted mode uses IE) and then using a non IE browser when in web mode? If so, try googling for something like "cross-browser document.selection"; if not, maybe someone with more IE experience can help answer your question. //Adam On 2 Juni, 06:31, bhomass <[email protected]> wrote: > I have a native method which uses > $doc.selection.createRange() > > I am not sure why the $ before doc. I simply copied it from some > sample code. this method works find when in hosted mode. but after > compile and called directly from a browser I get the $doc.selection is > undefined error. > > any ideas? > > Thanks. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
