I use a delegate pattern to do this very thing.  Its really the only
way to keep presenter logic where it belongs without polluting your
namespace with widgets.  The SuggestBox is none the wiser.  Just make
sure your delegator handles the base case where its delegate oracle is
null, of course, otherwise explosions aplenty.

-Ben

On Jan 6, 10:56 am, Patrick Tucker <tucker...@gmail.com> wrote:
> Thats a good idea, I will look into doing that instead.
>
> The SuggestBox isn't going to have any problems with the SuggestOracle
> being changed even though, if implemented this way, it doesn't know it
> is being changed?
>
> Thanks again,
> Pat
>
> On Jan 6, 11:46 am, Thomas Broyer <t.bro...@gmail.com> wrote:
>
> > How about having a SuggestOracle that simply delegates to another
> > SuggestOracle, and on which one you can swap the delegate? So, instead of
> > suggestBox.setOracle(...), you'd call mySwappableOracle.setOracle(...)

-- 
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-tool...@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