Boost logo

Boost :

From: Rob & Lori (Rob.Lori_at_[hidden])
Date: 2003-07-28 18:56:05


> -----Original Message-----
> From: boost-bounces_at_[hidden]
> [mailto:boost-bounces_at_[hidden]]On Behalf Of Brock Peabody
> Sent: Monday, July 28, 2003 9:16 AM
> To: 'Boost mailing list'
> Subject: RE: [boost] GUI/GDI template library
>
>
> It wasn't a great leap to progress further to:
>
> typedef boost::mpl::vector_c<char,
>
> '0','0','0','-','0','0','0','0','0','0'>
> ssn_mask;
>
> gui_manager<employee> gui =
>
> column( row("ssn: ", masked_edit<ssn_mask>(&employee::ssn),
>
> row("job", combo(make_job_code_map(),
> &employee::job_code)),
>
> column("name: ", edit(&employee::name)));
>
> employee e = get_employee();
>
> gui.set(e);
>
> gui.set_on_change(some_function);
>
>
> Does this seem like the right direction to take? At the very least it
> has reduced screens that took over 500 lines of code for us down to
> about 30.

I'd think making the GUI controls use Boost's Regex++ for text validation
would allow for much more flexibilty than straight masks, as you are using
in your library.

Also, I do like your idea of getting rid of static text controls.

Rob Geiman


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk