On Wed, Nov 26, 2003 at 01:55:48PM +0000, Angus Leeming wrote:
> > This pure Tcl/Tk solution might be a bit unfair to compare with, but I
> > can assure you that it takes me about ten minutes to add a new module
> > (includeing C++ code) to my long-standing 'toy' application which is a
> > Tcl/Tk Gui with a C++ core.
> 
> Shrug. What can I say? Let's return to the old days of xforms in the core?

That's neither desirable nor necessary.
If I had to compute 1+2 in my Gui/Core framework I'd use:

        #include "ui.h"

        void sum(ui & D)
        {
                int i1, i2;
                D.in >> i1 >> i2;
                D.out << i1 + i2;
        }

        ui_register("compute", "sum",  sum);

on the Core side and

  puts [compute sum 1 2]

on the Gui side. That's all that's needed for Gui/Core interaction. 
The interface can pass arbitrary data.
 
> Incidentally, I trigger exactly the same crash with your patch as you did and 
> I too have no idea why. However, I also think that Insert->Vertical Space 
> whould not insert an inset directly. Rather it should launch the VSpace 
> dialog, allowing the user to set the variables.

I thought this was taken care of by the code in factory.C:

        case LFUN_INSERT_VSPACE:
                if (!cmd.argument.empty())
                        return new InsetVSpace(cmd.argument);
                bv->owner()->getDialogs().show("vspace");
                return 0;

> In turn, this needs a 
> VSpaceMailer class to transfer data between the core and the frontend.

Ah. So I may have to copy some Mailer stuff, too.

> One final thing. Why does 'doInsertInset' not take a 'LyXText const &' as its 
> first argument? Works for me...

Don't know. Change it if it works.

Andre'

-- 
Those who desire to give up Freedom in order to gain Security, will not have,
nor do they deserve, either one.     (T. Jefferson or B. Franklin or both...)

Reply via email to