On Wednesday 15 May 2002 7:28 pm, John Levon wrote:
> > > This is heading dangerously close to re-implementing a widget toolkit
> > > and I'm not sure I like the idea.
> >
> > Bollocks. It's just OO-code. Nothing more.
>
> As long as it stays optional I suppose it's OK. But, for example,
> assuming a frontend has even grouped things in a similar fashion is an
> over-assumption of the generic code imo.

The idea about the "suspect" widgets is for the button controller to have an 
addSuspect method. I'd invoke it within the View's build method:

        bc().addSuspect(&widgets().someSuspectWidget);

Then when bc.valid() gets called, it could loop over this list of widgets

        list<XFwidget *> suspect;
        list<XFwidget *>::const_iterator it = suspect.begin();
        list<XFwidget *>::const_iterator end = suspect.end();
        bool valid = true;
        for (; it != end; ++it) {
                if (!isValid(*it))
                        valid = false;
        }

        if (valid)
                // enable Apply/Ok

So, if you don't want this, then don't invoke addSuspect!

I'd like to see what you come up with instead in QPreferences though...

Angus

Reply via email to