Angus Leeming wrote:
> We could certainly pass a BufferView to showDialog and updateDialog and
> that BufferView could come from the calling FuncRequest. The problem comes
> with hideDialog which must be called from the inset's d-tor. I'm at a bit
> of a loss how to do that otherwise. I would really like to avoid using
> signals...

Actually, we could have 

static boost::signal2<void, string const & InsetBase*> Dialogs::hideDialog

and connect this to any instance of the Dialogs class. It would be used as:

        void MailInset::hideDialog() {
                Dialogs::hideDialog(name(), &inset());
        }

and it _would_ work. Moreover, we'd insist that valid BufferViews were 
passed to the other MailInset methods. Either:

        void MailInset::showDialog(BufferView &);
        void MailInset::updateDialog(BufferView &);

or Assert a BufferView *. (Do you have a preference?)

Does this sound like a coherent plan?

-- 
Angus

Reply via email to