Re: Are handlers kept registered on PopupPanel when we call hide() on it ?

2012-02-07 Thread Boris Lenzinger
Thank you for your answer Thomas. I'll check this and will come back with
other questions if I still don't understand :-)

Boris


2012/2/6 Thomas Broyer 

> It looks like the issue is not really the PopupPanel but rather the
> widget(s) you add inside: if you reuse the same widget (either in a single
> PopupPanel that you hide/show, or within several PopupPanel-s during the
> lifetime of the application), then handlers won't be unregistered for you,
> just like for any other widget (the same goes for the CloseHandler attached
> to a PopupPanel: PopupPanel is a widget like any other –except you don't
> add it to a parent widget–, so handlers aren't unregistered automatically).
> If on the other hand you re-create everything from scratch every time, then
> you'll obviously have to register your handlers on the new instances.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-web-toolkit/-/J1_fBGcLXMcJ.
> To post to this group, send email to google-web-toolkit@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.
>

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



Re: Are handlers kept registered on PopupPanel when we call hide() on it ?

2012-02-06 Thread Thomas Broyer
It looks like the issue is not really the PopupPanel but rather the 
widget(s) you add inside: if you reuse the same widget (either in a single 
PopupPanel that you hide/show, or within several PopupPanel-s during the 
lifetime of the application), then handlers won't be unregistered for you, 
just like for any other widget (the same goes for the CloseHandler attached 
to a PopupPanel: PopupPanel is a widget like any other –except you don't 
add it to a parent widget–, so handlers aren't unregistered automatically). 
If on the other hand you re-create everything from scratch every time, then 
you'll obviously have to register your handlers on the new instances.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/J1_fBGcLXMcJ.
To post to this group, send email to google-web-toolkit@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.



Are handlers kept registered on PopupPanel when we call hide() on it ?

2012-02-06 Thread Boris Lenzinger
Hi,

I was wondering how this is working. I made some code where I registered
some event handlers on a PopupPanel so I can keep the data up to date.
But when I call hide on this popup panel and recreate a new one, then
handlers are registered 2 times and so events are handler 2 times.

I was expecting another behavior : when the popup panel is hidden, I
thought it was some kind of destroy. So I think that my strategy to rebuild
a new PopupPanel is not good. Can you explain me how this should be
designed please ?

Many thanks in advance.

Boris

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