Boost logo

Boost :

From: John Torjo (john.lists_at_[hidden])
Date: 2004-11-16 12:04:00


>
> you are missing my point. I want a higher level of abstraction.
>
> win32gui is nice if you have a simple 1:1 binding for a struct - dialog
> scenario. But it will kill you if you have a frame window with a
> notebook as a client, several notebook pages with splitter windows, list
> boxes forms etc...

Really? Why?

>
> I don't think I would like to do that using your 'save_dlg' setting. You
> need a way to break it up into small, manageable parcels.

And how is that not broken up into small parcels?
(side-note: a dialog can contain sub-dialogs, each subdialog showing
small pieces of information)

>
> The Lit Window Library (http://www.litwindow.com/library) also lets you
> specify complex bindings that evaluate C++ expressions:
>
> Frame.Title = "Headline: " + myStruct.m_title

Really? That's very unflexible if you ask me. You see everything as
scripting. In fact, I see very little as scripting.

You should note that you lose a lot of C++'s power if you switch to
scrpting.

And just for fun, you can accomplish the above using save_dlg, very easy:

std::string headline(const your_struct & val) {
   return "Headline: " + val.m_title;
}

When creating the corresp. class, simply say:

add_corresp( &headline, ID_whatever_field);

>
> The data abstraction layer requires some macros, which btw are using
> templates and are type save, but allows you to do more than simple 1:1
> binding.

Show me real examples where this makes sense. And let me repeat:
- the 1:1 is a current limitation
- you can work around it.

And more to the point, where do you do validation? I don't see it
anywhere in code.

Best,
John

-- 
John Torjo,    Contributing editor, C/C++ Users Journal
-- "Win32 GUI Generics" -- generics & GUI do mix, after all
-- http://www.torjo.com/win32gui/
-- v1.5 - tooltips at your fingertips (work for menus too!)
    + bitmap buttons (work for MessageBox too!)
    + tab dialogs, hyper links, lite html

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