Hi all,

I've read all the posts about this subject and I understand what the
restrictions are on this subject, however I cannot seem the figure
this one out.

I use the following lines of code(snippets):


RootPanel ccWidget = RootPanel.get("cc_js_widget_container");
ccWidget.setvisible(false);

...

ccWidget.setvisible(true);

VerticalPanel lowerpanel = new VerticalPanel();

Button choose = new Button("Choose this license");
lowerpanel.add(choose);

choose.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                String result =
ccWidget.get("cc_js_result_uri").toString();
                showResult(result);
            }
        });


RootPanel.get("lowerbody").add(lowerpanel);

Now this renders correctly, however is if I click Choose I get the
uncaught exception:
A widget that has an existing parent widget may not be added to the
detach list

If I then click again, this exception does not occur and it goes on a
happy little program.
I stepped through the proces and I get the exception on the line:
String result = ccWidget.get("cc_js_result_uri").toString();

What am I not seeing here?

-- 
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.

Reply via email to