A much more reliable solution would be the method:

qx.ui.mobile.core.Widget.getWidgetById(String id)


Greetz Christopher
________________________________________
Von: Derrell Lipman [[email protected]]
Gesendet: Donnerstag, 14. Juni 2012 22:55
An: qooxdoo Development
Betreff: Re: [qooxdoo-devel] mobile: layout parent is null

On Thu, Jun 14, 2012 at 4:16 PM, Derrell Lipman 
<[email protected]<mailto:[email protected]>> 
wrote:
I am trying to respond to touchstart and touchmove events on a container. When 
I receive a touchstart or touchmove event, I start with widget=e.getTarget() 
and walk up the the layout parent chain with widget=widget.getLayoutParent() 
until I find a container on which I which I can operate.

I'm finding, however, that if I add a qx.ui.mobile.list.List() to one of my 
containers, I get a parent of null during that walk, because e.getTarget() 
returns a qx.ui.mobile.container.Composite whose parent is a 
qx.ui.mobile.list.renderer.Default, which has a parent of null. This Default 
renderer is not properly in the layout chain!

If the touchstart begins on a list item, how can I figure out which container 
the list is in?

I ended up accomplishing this by walking up the DOM element tree until I found 
an element that has a CSS class of one of my containers. That seems unreliable 
and difficult to work with. I think that walking the getLayoutParent() chain 
should be made to work.

Derrell


------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to