On 11/5/2010 11:08 AM, Jean-Noël Rivasseau wrote: > Martin: done, http://bugzilla.qooxdoo.org/show_bug.cgi?id=4290 > > Kenneth: I did not really understand your remarks. Can you effectively > access the DAG from the converter function? At this point I think not [Ah, hang on, "DAG" is not what I thought it was. What is required is a tree where children know their parents and parents of course know their children. So...]
Anyway, I see at least a limited amount of navigation possible in that LayoutItem can determine its container via the oddly-named getLayoutParent method. And of course containers can see their children. So one widget can navigate to another by searching the tree. I do this all the time in Cells (https://github.com/kennytilton/cells/wiki) the bit behind qooxlisp (https://github.com/kennytilton/qooxlisp/wiki), though with that I search a tree of widgets on the Lisp side that shadow the JS widgets on the client-side. But if you are not lucky enough to be using qooxlisp you can do the same in qooxdoo/JS by searching the tree in an orderly fashion for the desired other widget. In Lisp I have a "model-name" property, and search either for the nearest instance of that name or for an instance of a certain type, which makes things less brittle than hard-coding a sequence of steps (which breaks as I refactor the layout). So you would have to give LayoutItem an optional "name" property, but then away you go. I'd hack up a suite of utilities for searching in different ways. The cool thing now is unlimited information being available in deciding a conversion. Of course I do not just convert in Cells, I can ask for any number of values from any number of things and compute an arbitrary function to come up with a new value. kt ------------------------------------------------------------------------------ The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book "Blueprint to a Billion" shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
