On Mon, Dec 12, 2011 at 1:44 PM, Anthon van der Neut <[email protected]> wrote: >>> I am not sure if the openWindowClosed event should be triggered, since I do >>> not close anywindows. I just replace a div (which includes the element with >>> the ID I later replace from the python main() function. >> ok then you want RootPanel.get(id_to_use) - see dynamictable as an example. >> > But then I need the patch I supplied earlier because > RootPanel(id_to_use), caches the result and that gets invalidated by the > reinsertion of DOM elements by jQuery.
mhrhhmm... ok could you put together an example somewhere? oh wait, hang on: you're *reinserting* DOM elements using jquery? yes, that's pretty much guaranteed to get you into trouble, all round. you can't do that: an element that is "managed" by a pyjamas object has to remain "managed". you can manipulate sub-DOM (i.e. child DOM elements) but you *cannot* touch anything that is referred to via a "self.element". not unless you want to get into a mess, that is. there's a way round that - it needs about 50 lines of code to be written, that's all, and i've described several times what's needed. > Even if the onWindowsClosed would > trigger, the original code does not empty the rootPanels 'cache'. > > BTW RootPanel.get(id_to_use) throws an error. that has to be a string, obviously, named after the id of the div that you want objects to be attached to.

