On Mon, May 26, 2008 at 08:49:09AM -0400, Jorge Arellano Cid wrote:
Corvid has been working around forms lately so please try to coordinate ideas with him
OK.
There's a lot of cut-and-paste code like "foo->get (foo->size () - 1)". Adding getLast() methods to some lout classes and using them wherever possible would remove a lot of clutter.
OK.
OK, that's next on the TODO.
Just beware of not converting the "horrible case code" into "horrible virtual method subclassing". :-)
To be honest I don't think I can promise that it will be worth doing until I have a go, I am just optimistic enough to want to have a go.
FLTK2 does this quite nicely with the virtual handle() method.
Yes, that's a good model. I guess the analogy would be for the Input classes to have virtual update_form_from_html() and form_values() methods. There problem with creating Input objects as there is no such thing as a virtual constructor or virtual class method. So some case code might remain, but it would be hidden in the class API and the switch would simply select which derived class constructor to call. That's not so bad. Regards, Jeremy Henty