Hey Daniel,

2009/3/16 Daniel Cavalcanti <[email protected]>:
> Hello all!
>
> I`ve created this Wt helper widget and named it WBuilder. Given a XML file
> with an hierarchical widget content, WBuilder will generate the WWidget tree
> for the executable. The XML parsing is done by mini-xml (so it may be
> incorporated by Wt without problems).
>
> The typical usage is this, wherever you would create and insert widgets into
> root() or any other container widget, you use this:
>
> WBuilder builder;
> builder.load(your-xml-filename);
> builder.build(your-widget-tree-name, root());
>
> And thats it! root() has all the content defined by your-xml-filename.
> Widgets are defined in the xml by the name, for example:
> <WContainerWidget name="my-tree-name"></WContainerWidget>
>
> Will generate a WContainerWidget named (please do not confuse a widget
> "name" with it`s Id) "my-tree-name".
>
> I understand that there will be those who will ask "But whats the point if
> we can just add stuff by hand?", well the entire point of the widget is that
> you can compile your application just once and perform all of your
> divs/buttons/text changes associated with CSS on external files which
> require no compilation at all. This has been saving me a lot of time on Wt
> application development.

I think your implementation is very nicely done, and can see the
benefit of it as it is. Still, do you see any direction for its
evolution to the point where it also supports signal/slot connections
? For (event) signals like clicked() etc..., it would not be too hard
to foresee introspection support (since a widget already knows them
kind of), and this could be expanded also to signals. It would be an
interesting exercise to think about how to deal with slots without
requiring a moc preprocessor.

We have also recently (it just made it 2.99.0) added setObjectName()
and objectName() methods, which I think would correspond well to your
'name' in the xml file.

Regards,
koen

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to