2009/2/27 Moritz Onken <on...@houseofdesign.de>: > > Am 27.02.2009 um 15:41 schrieb Moritz Onken: > >> >> Am 27.02.2009 um 15:38 schrieb Carl Franks: >> >>> 2009/2/27 Moritz Onken <on...@houseofdesign.de>: >>>> >>>> Yes it's ExtJS stuff. I need hashrefs to feed a JSON encoder. I'm not >>>> sure >>>> yet how it should be implemented. But I think this is a good start. >>>> >>>> I attached a patch which adds the functionality to default_values(). >>>> Test >>>> t/form/default_values.t modified. >>> >>> Do you think you'll write the new model class? >>> If so, I'd probably rather not also change >>> HTML::FormFu::default_values(). >>> >>> btw, I prefer to try to avoid any kind of isa() logic - look instead >>> at methods such as: >>> is_repeatable() >>> is_block() >>> is_field() >> >> Oh, didn't know of these. If you prefer I'll write a Model class. >> >> moritz > > Am I correct that $element->isa('HTML::FormFu::Element::Multi') == > $element->is_field && $element->is_block?
Hm, yes - though I wonder whether this might be an instance where it would be more robust to use isa() as it's not really possible to anticipate whether there might be other elements added in the future that are both a block and a field, and whether they'll be compatible with what you're trying to do? I think I'll leave that for you to decide! Carl _______________________________________________ HTML-FormFu mailing list HTML-FormFu@lists.scsys.co.uk http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu