Hi Ray, all,

I believe changing HMs mid stream is dangerous:

1. Say your (nav & edit) widget fires events that are common to both modes
(i.e. a simple onOpen) and the widget is by default in nav mode
2 Say A registers an onOpen handler (which gets added to hm1 -- the default
HM)  then later switches to edit mode (and hm2 kicks in)
3. A will not see the onOpen events while on edit mode!

If your nav & edit widet stays always in one mode, then createHM would do
the trick. But if it switches modes you have to make sure there is no
overlapping sets of events ...

Andi






On Tue, Feb 9, 2010 at 11:55 AM, Ray Ryan <[email protected]> wrote:

> If you're right that swapping HMs midstream is a bad idea, I think you need
> a better argument than "it's a bad idea." What's the actual danger? If I'm
> making my own HM I'm already pretty savvy. Why tie my hands?
>
> But yes, if you win that point, I agree with the change to replace
> setHM(HM) with HM createHM()
>
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to