|
What are the advantages of dynamically creating user interface components through xml data binding, instead of using a _javascript_ api?
I’ve been playing around with pie menus for Laszlo, trying to come up with a Laszlish way to dynamically create and configure them.
http://www.donhopkins.com/drupal/node/40 http://www.donhopkins.com/lzxnet/my-apps/PieTest.lzx http://www.donhopkins.com/lzxnet/my-apps/PieTest.lzx?lzt=source http://www.donhopkins.com/lzxnet/my-apps/piemenu.lzx?lzt=source
The Laszlo pie menus don’t currently support an API for modifying the menus dynamically, but I’ve been thinking about how that should work, and how it could support user-editable menus that knew how to write themselves back out as XML.
Some pie menus are dynamically generated from data, so all items are usually handled the same (or from a small set of pre-defined handlers based on the dataset), but other pie menus are designed by hand with custom handlers, tracking feedback and graphical resources associated with each item.
One problem with only defining widgets from XML, is how do you attach custom methods and event handlers to widgets?
Including custom _javascript_ handlers and constraints in the widget xml definition would require a _javascript_ compiler in the Flash player (but it would be possible in the DHTML version of Laszlo). You have to pre-define all the handlers and constraint expressions as named functions, refer to their names in the xml, and look them up at run-time.
-Don
|
_______________________________________________ Laszlo-dev mailing list [email protected] http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
