On 4 nov, 11:54, Nicolas Antoniazzi <nicolas.antonia...@gmail.com> wrote: > Very interresting Thomas. It is similar in some ways to the gwt-presenter > project. > > Just a question. You says that views are singleton. I understand the reason > (efficiency). But does not it leads to UI state problems ? > By instance, if you call a method on your view that adds a new css class to > an element, it means that you will have to remove it before destroying the > PresenterActivity (if you want to reuse it later). Or do you have a special > mechanism to handle such cases ?
Yes, presenters are responsible of "clearing things up" (either when they start, or when they stop); it also means that, for instance, if a "field" (or label, or whatever) is empty, it has to be explicitly *set* to the empty value, as the previous presenter might have changed it to another value. And no, we haven't added anything explicit to deal with it, only because we haven't yet met the case were it'd be needed (but we're still very early in the project) (actually, SimplePresenterActivity has setupView and teardownView methods, which are overridden in PresenterActivity to call getView().setDelegate(this) and getView().setDelegate(null) respectively, but we haven't used them for anything else (yet)) -- 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.