John Levon wrote:

> On Thu, Feb 20, 2003 at 01:27:34PM +0000, Angus Leeming wrote:
> 
>> You need an LFUN_SHOW_DIALOG_NEXT that finds the desired inset and then
>> opens the dialog. You could either call Dialogs::show direct as:
>>         owner->getDialogs().show(name, data, inset);
>> where 'data' is a string of the stuff you wish to edit which can be
> 
> This sounds OK.
> 
>>                 if (inset) {
>>                         if (isCommandInset(inset)) {
>>                                 // exits already
>>                                 mailer = new InsetCommandMailer(name,
>>                                 *inset);
>>                         } else if (isTabularInset(inset)) {
>>                                 // hypothetical
>>                                 mailer = new InsetTabularMailer(*inset);
>>                         }
> 
> Why have you chosen to switch on the type of inset here ? 

The Dialogs class can work out who to call from the 'name' but we need to 
fill 'data' appropriately. Either use a switch or have a new 
        virtual string const Inset::stringForDialog() const
method perhaps.


> Note we would need a more explicit test than isCommandInset - 
> we really need to know the difference between Citation and Index etc.

Not to fill 'data' you don't. Moreover, the Dialogs class can work out who 
to call from the 'name'.

> I must admit I skim-read the recent discussion so if  this is covered
> already, please just ignore me.

I prefer to inform.

-- 
Angus

Reply via email to