Hey,
> I have a very annoying error in my current application (uses qooxdoo 3.0.1).
> 
> I have a window, that creates other windows dynamically, when needed.
> This is done with a Mixin, that holds the references to that windows and
> therefore also has a destructor to dispose those references if instantiated.
> 
> 
> Now when I log-out of my application (all the destructors for all created
> windows are called in this case), I get this "content is null" Error in
> renderLayout() Method of Widged.js line 995 [1]

Sounds strange.


> Some questions arise:
> 
> 1. All th sub-windows are closed at "logout time". So why is "renderLayout"
>   been called for any of those that sub-window instances at all?

Thats a good question! Sounds like a framework issue to me so I'm interested in 
a solution as well. :) It could be that the remove of the disposed widget from 
the layout queue is missing somewhere but thats only a guess.

> 2. The destructor for the window and the sub-windows have already been called.
>   When firebug hits the error, 'this.$$disposed === true' and 'this' is an
>   instance of sub-window. Although it's an *ex* instance I should say ;)
>   This seems to be O.K., right? The window-destructor is called, that called
>   the Mixin-destructor, that called the destructor of the sub-window.[2]

It's not ok that a disposed widget should be rendered but the rest seems to be 
good.


> I can remove the destruction of the sub-window handles from the Mixin to
> prevent this error from happening, but then the destructor of the sub-windows
> are not called and that's something I don't want!
> 
> 
> 
> Guarding the access to undefined 'content' (line 994 in Widget.js) like this
> does the trick for me...
> ---------------------------------
> 994: if (content && Object.keys(contentStyles).length > 0) {
> 995:   content.setStyles(contentStyles);
> 996: }
> -----------------------------------
> ...but I have no idea what else this could break! Although this extra check 
> for
> 'content' to be defined/not-null looks save to me.

That will only prevent the consequences but does not solve the root cause of 
the issue. Who knows if there breaks something else in some other situations. 

> Nevertheless, I would be interested if someone could help me getting the
> *reason* for this
> 
> Or can anybody point me into a direction how to fix this in the first place?

Thats hard to tell without seeing the issue by myself. Do you have any chance 
to let us see the issue?

Regards,
Martin
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to