Script stucks when adding decorator to widget

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Script stucks when adding decorator to widget

deniska
Weird thing happens. I have a class extending Widget, when I'm trying to add a decorator to it, the script just gets stuck.

http://tinyurl.com/cf263tb - this is a playground example, it runs fine, but when you remove the remark and run it, it just dies.
Reply | Threaded
Open this post in threaded view
|

Re: Script stucks when adding decorator to widget

Daniel Wagner
Administrator
Hi,

the decorator adds four pixels to the outer widget's height. So when
your "resize" listener applies that height to the inner widget, the
outer widget has to grow by another four pixels to accommodate the inner
widget, the event is fired again and you've got your infinite loop.

Generally, you shouldn't have to manually adjust the inner widget's
size, qooxdoo's layout system can probably do that for you. Check out
the "flex" property of the HBox/VBox layouts, or the "edge" property of
the Canvas layout.


Regards,
Daniel

On 06/06/2012 04:16 PM, deniska wrote:

> Weird thing happens. I have a class extending Widget, when I'm trying to add
> a decorator to it, the script just gets stuck.
>
> http://tinyurl.com/cf263tb - this is a playground example, it runs fine, but
> when you remove the remark and run it, it just dies.
>
> --
> View this message in context: http://qooxdoo.678.n2.nabble.com/Script-stucks-when-adding-decorator-to-widget-tp7580288.html
> Sent from the qooxdoo mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Script stucks when adding decorator to widget

deniska
Ouch! Thanks, I'll use layouts instead.