On Thursday 05 April 2001 05:47, Allan Rae wrote:
> > Yes, this is a fudge to a lacking ButtonPolicy. Consider inputting a
> > citation-inset from the minibuffer. The params are perfectly valid, the
> > dialog pops up. Do you want to "Apply" them? Yes I do!
> 
> Doesn't the citation inset already exist at that stage with those values?
> You're more familiar with this process than I am since you reworked a lot
> of it.

Here's the rule: 
http://www.mail-archive.com/[email protected]/msg21186.html
(points 2 and 4) Currently, none of the insets conform to it exactly, but 
many (most) do so almost. Eventually, they all will.

But basically, no, the inset does not exist when the dialog is launched from 
the minibuffer.

> I think this is the problem we've discussed before about the
> OkApplyCancel[ReadOnly]Policy.  I think it would probably make sense to:
> 
> -     outputs_[INITIAL] = CLOSE;
> +     outputs_[INITIAL] = OKAY | APPLY | CLOSE;
> 
> This should be a safe change for both these policies.  It'd also mean that
> after a Restore you can still press Okay or Apply without changing
> something in the dialog.
> 
> Provided we do an input check on the contents of the dialog just as it is
> being shown then we can move to the appropriate state (INVALID or
> RO_INVALID) if the contents aren't initially valid.  I suspect we assume
> that the contents are always valid on initial showing.

Hmmm. So we should have

void ControlSomeDialog::show()
{
        bc.valid(isValid(params()));
        view().show();
}
void ControlSomeDialog::update()
{
        bc.valid(isValid(params()));
        view().update();
}
So, another reqirement of the Params struct: it should have an isValid() 
memeber function too.

> I'd enjoy being back.  I'll have to get familiar with the code again
> though.  So much has changed.  You blokes, and you in particular Angus,
> have been doing a terrific job.

Most of the change is superficial; moving stuff out of one class and into 
two. It's worth while trying to understand the control flow, but all Views 
see exactly the same flow, even though there are two generic controllers, 
ControlInset and ControlDialog. If you can think of a better name for 
ControlDialog, then shout it out!

A

Reply via email to