Now I look at this, I realize that for this example, the phoneEditor is a pop-up. But the case is still valid in general terms. The widget implements a widgetInterface, and to bind that widget to the rootpanel, a cast is necessary in the go() function. How do I avoid the cast or if I don't, is this best practice?
On 25 jun, 13:02, mabogie <[email protected]> wrote: > I'm having trouble with one other thing in that presentation. > In the end of theMVPpart, Ray concludes with > contactViewer.go(RootPanel.get()); > > But, since phoneEditor is a presenter, and display a interface, to > bind the widget to the rootpanel one needs to cast it: > > rootPanel.add((Widget)phoneEditor.display); > > I want to avoid casting this, how should I do that? > > On 23 jun, 08:59, Ed <[email protected]> wrote: > > > He Jason, > > > Yep, you are right, it's just with my MVC setup you can't just > > subscribe to the bus in with a global event handler you can. > > > For me, it would be ur second option as the Windows.Close event is way > > to course grain for me as the application is too complex and there > > happens too much for a long time, such that memory leaks can already > > have caused big problems before this event occurs. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
