Ahh, I'd like to apologize for not spotting this earlier but I had
"<set-property name="user.agent" value="gecko"/>" earlier and
therefore it was wreaking all sorts of havoc when I went to debug the
application.  Commenting that out sorted everything out and I'm now
happily trying to override the requestSuggestions method.  Thanks for
leading me to the solution.

nevets1219

On Apr 18, 3:17 pm, nevets1219 <nevets1...@gmail.com> wrote:
> Perhaps I'm doing something wrong, can I just extend
> MultiWordSuggestOracle to do what I want by overriding
> requestSuggestions ?  I tried doing so but I get the following error:
>
> Unable to load module entry point class xxx (see associated exception
> for details)
> com.google.gwt.core.client.JavaScriptException: (TypeError): Object
> doesn't support this property or method
>  number: -2146827850
>  description: Object doesn't support this property or method
>         at com.google.gwt.user.client.ui.impl.FocusImplOld.createFocusable
> (Native Method)
>         at com.google.gwt.user.client.ui.MenuBar.init(MenuBar.java:861)
>         at com.google.gwt.user.client.ui.MenuBar.<init>(MenuBar.java:181)
>         at com.google.gwt.user.client.ui.SuggestBox$SuggestionMenu.<init>
> (SuggestBox.java:163)
>         at com.google.gwt.user.client.ui.SuggestBox.<init>(SuggestBox.java:
> 318)
>         at com.google.gwt.user.client.ui.SuggestBox.<init>(SuggestBox.java:
> 301)
>         at xxx.onModuleLoad(xxx.java:148)
>
> Where xxx.java:148 is "_input = new SuggestBox(_tokenOracle);" and
> _tokenOracle is the class which extends MultiWordSuggestOracle.  I
> haven't done anything fancy with TokenOracle yet either:
>
> public class TokenOracle extends MultiWordSuggestOracle {
>   public TokenOracle() {
>     super();
>   }
>   public TokenOracle(String whitespaceChars) {
>     super(whitespaceChars);
>   }
>
> }
>
> On Apr 18, 1:19 pm, Vitali Lovich <vlov...@gmail.com> wrote:
>
> > No - you need to write your own oracle.  The ones that are there are
> > for simple examples to handle most cases.
>
> > On Sat, Apr 18, 2009 at 5:21 AM, nevets1219 <nevets1...@gmail.com> wrote:
>
> > > I was wondering what steps I should go about showing suggestions based
> > > on the last token.  At first, I was thinking that I needed to specify
> > > the white space but that doesn't seem to be the case (or maybe I have
> > > used the incorrect white space).
>
> > > Example:
>
> > > I have the following words in the oracle: "cos, sin, tan"
>
> > > I type "co" and choose "cos" but I continue typing so that I have "cos
> > > (10) + t", I would like to now have it show "tan" as the suggestions.
>
> > > I'm guessing I need to add .getTextBox().addChangeHandler(handler) and
> > > extract the last token and then make a call .requestSuggestions
> > > (request, callback).  The change handler seems relatively
> > > straightforward but I'm actually not too sure about
> > > the .requestSuggestions(...) part since I'm still relatively new to
> > > GWT.
>
> > > Also slightly related:  Is it appropriate to think of
> > > MultiWordSuggestOracle.add("word") as
> > > MultiWordSuggestOracle.createSuggestion("word", "word") ?
>
> > > Thanks!
>
> > > nevets1219
--~--~---------~--~----~------------~-------~--~----~
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-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to