AH-HA (yes that was my AH-HA moment!) That really helps me understand your original post that you mentioned below, I didnt get the significance of you saying "you don't need a Widget here." because as far as my application was working, I didnt HAVE a widget, and i didnt want a widget, and as far as I knew i was not creating a widget, but now you tell me that using RootPanel.get() turns that section INTO a widget, it all suddenly makes sense! LOL
Thanks, I think i can figure it all out from here now... On 24 February 2010 15:30, Thomas Broyer <[email protected]> wrote: > > > On Feb 24, 1:40 pm, John Denley <[email protected]> wrote: > > Thanks for this Thomas this has helped me narrow down my problem, but Im > > still not sure why Im getting the error heres my HTML code: > > > > <body> > > <iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' > > style="position:absolute;width:0;height:0;border:0"></iframe> > > TEST HARNESS<br> > > <table id="registration_page"> > > <tbody> > > <tr> > > <td id="loadingcontainer"> > > Loading the Application, Please wait.....<br> > > </td> > > </tr> > > <tr> > > <td id="logincontainer"> > > </td> > > </tr> > > </tbody> > > </table> > > TEST HARNESS END > > </body> > > > > Heres my onmoduleLoad(): > > { > > RootPanel.get("registration_page").setVisible(true); > > RootPanel.get("logincontainer").add(new HTML(""+"LOGIN SCREEN")); > > > > } > > > > If I comment out the first line it works fine, and if I leave it as above > I > > get the error on the second line. > > > > From what you have said, Im guessing that the very act of using the > > "setVisible" is making GWT think that the "registration_page" is now a > GWT > > widget > > No, RootPanel.get(...) creates a RootPanel widget that wraps the > element, whether you call setVisible or not. > > > and so it now wont let me add the new HTML to the "logincontainer" > > which is a child of "registration_page", presumably because there is a > > possibility that I could "setVisible(false)" and that would effectively > > "kill" the "logincontainer"?! > > Possibly because you could do weird things with the > "registration_page" that would somehow put "logincontainer" in such a > state that GWT would correctly "clean up" after itself on page unload, > leading to memory leaks. > As I said on issue 3511 a while ago: > """If all you want to do with "rightTopTable" is make it visible/ > invisible, use > Document.get().getElementById("rightTopTable") and then > getStyle().setProperty("display", "none") or UIObject.setVisible(e, > false); you don't > need a Widget here.""" > http://code.google.com/p/google-web-toolkit/issues/detail?id=3511 > > -- > 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]<google-web-toolkit%[email protected]> > . > 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 [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.
