Thanks for the suggestion. Sounded what I needed but when I tried it,
didn't have the effect I hoped for.

The following still gives an exception (in the constructor of a Widget):

qx.ui.core.queue.Manager.flush();
var container = this.getContentElement().getDomElement();
container.style.lineHeight="normal"; // Exception: cannot read property
style of null
...


So I still have to use (making it asynchronous):

qx.ui.core.queue.Manager.flush();
 this.addListenerOnce("appear", () => {
            var container = this.getContentElement().getDomElement();
            container.style.lineHeight="normal";
            ....
})


Is there somehting else I'm missing? I just want the widget to create its
underlying DOM elements and not delay it.



On Mon, Aug 25, 2014 at 12:59 PM, Daniel Wagner <daniel.wag...@1und1.de>
wrote:

> Hi Peter,
>
> you can force a queue flush by calling
>
> qx.ui.core.queue.Manager.flush()
>
>
> Regards,
> Daniel
>
> On 25.08.2014 09:13, Peter Dekkers wrote:
> > When developing a widget, I found out that I have to wait for the appear
> > event before I can access the underlying dom elements. When I try to
> > access this element before that, it is not yet defined. So my code looks
> > like this:
> >
> > this.addListenerOnce("appear", () => {
> >             var container = this.getContentElement().getDomElement();
> >             .... do something ...
> > }
> >
> > Hoever in my code after I instantiate the widget, I have some logic that
> > relies on  "... do something...." and I prefer not to make that async
> also.
> >
> > Is there anyway to force this to be "synchronous behavior". So a
> > synchronous call where afterwards I can call
> > "this.getContentElement().getDomElement()" and get the corresponding
> > HTML element back.
> >
> > I imagines there is some queueing mechanism, that causes this async
> > behavior. So perhaps some command that processes this queue (like a
> > forced rendering) ?
> >
> > TIA!
> >
> > -- Peter
> >
> >
> >
> ------------------------------------------------------------------------------
> > Slashdot TV.
> > Video for Nerds.  Stuff that matters.
> > http://tv.slashdot.org/
> >
> >
> >
> > _______________________________________________
> > qooxdoo-devel mailing list
> > qooxdoo-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> >
>
>
> ------------------------------------------------------------------------------
> Slashdot TV.
> Video for Nerds.  Stuff that matters.
> http://tv.slashdot.org/
> _______________________________________________
> qooxdoo-devel mailing list
> qooxdoo-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to