Sunday, June 27, 2010

Re: how to use GIN ?

hi
 Google to gwt-presenter
HIH


On Sun, Jun 27, 2010 at 12:51 PM, yves <yves.konen@gmail.com> wrote:
Hi Everybody,

I've read the the "official" tutorial at http://code.google.com/p/google-gin/wiki/GinTutorial,
but I still doesn't understand how to use GIN (as it is mainly based
on Guice that I don't know)  and how it could help me :-( Sorry for
the tutorial writer :-)

I'm currently developping an MVP based app mainly inspired by the
google IO 2009 presentation
http://code.google.com/intl/fr/events/io/2009/sessions/GoogleWebToolkitBestPractices.html
and also the article http://code.google.com/intl/fr/webtoolkit/articles/mvp-architecture.html.

Here is an example of the code I would like to simplify using DI (as I
understand, GIN could do some part for me) :

public class SearchPresenter implements Presenter {

       public interface Display {
               HasClickHandlers getSearchButton();
       }

       Display display;

       public void bind(Display d) {
               display = d;
               display.getSearchButton().addClickHandler(new ClickHandler() {

                       @Override
                       public void onClick(ClickEvent event) {
                               doSearch(event);
                       }

               });
       }


As I understand, perhaps I am wrong, GIN could do the bind() for me ?
But, how should I use GIN for that (if it is really suited for this) ?

Thanks for your help !
Yves

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.




--
"Computers are useless. They can only give you answers."
- Pablo Picasso -

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment