Re: $doc.selection is undefined in GWT

2009-06-22 Thread chardina...@boyd.org.nz
I've also been trying to work with selections in GWT and found this GWT extension: http://code.google.com/p/rocket-gwt/wiki/Selections It works with GWT 1.5, I don't know if it has been tested with GWT 1.6. I haven't used it myself Text selections seems like a fairly important thing, does anyon

Re: $doc.selection is undefined in GWT

2009-06-10 Thread bhomass
found the answer. FF uses $wnd.getSelection().getRangeAt(0) thanks for all the help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolki

Re: $doc.selection is undefined in GWT

2009-06-10 Thread bhomass
found the answer. FF uses $wnd.getSelection().getRangeAt(0) thanks for all the help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolki

Re: $doc.selection is undefined in GWT

2009-06-07 Thread bhomass
Thanks for the clarification. I am sure I am close now. but still get an error. my code is private native Element getSelectedTextParent() /*-{ var range = null; if($wnd.document.selection){ range = $wnd.document.selection.createRange();

Re: $doc.selection is undefined in GWT

2009-06-06 Thread alexey.dashkev...@gmail.com
On Jun 5, 11:14 pm, bhomass wrote: > I looked up some cross browser code. but I am getting different > results > >   if (document.getSelection) { >     var range = document.getSelection().createRange();; >   } else if (document.selection && document.selection.createRange) { >     var range = do

Re: $doc.selection is undefined in GWT

2009-06-05 Thread Thomas Broyer
On 5 juin, 22:14, bhomass wrote: > I looked up some cross browser code. but I am getting different > results > >   if (document.getSelection) { >     var range = document.getSelection().createRange();; >   } else if (document.selection && document.selection.createRange) { >     var range = docu

Re: $doc.selection is undefined in GWT

2009-06-05 Thread bhomass
I looked up some cross browser code. but I am getting different results if (document.getSelection) { var range = document.getSelection().createRange();; } else if (document.selection && document.selection.createRange) { var range = document.selection.createRange(); } else { var

Re: $doc.selection is undefined in GWT

2009-06-04 Thread Adam T
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 one knows what's wrong with this? > > sorry if this is second posting. I p

$doc.selection is undefined in GWT

2009-06-03 Thread bhomass
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 one

Re: $doc.selection is undefined

2009-06-01 Thread Adam T
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 Googl

$doc.selection is undefined

2009-06-01 Thread bhomass
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