Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:

| >>>>> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:
| 
| Lars> We should make a way to ensure that LyXFunc are called with the
| Lars> correct number of arguments and also that the arguments are of
| Lars> the correct type. I think I have a nice solution for
| Lars> this...first we change the LyXFunc::dispatch to a different type
| Lars> of arg...
| 
| This seems nice, but we need a way to declare the types of the
| arguments of functions, or something like that.

Actually we don't _have_ to the LFUN case in LyXFunc will take care of
that:

case LFUN_BUFFER_NEW:
        ..check for number of args.. if one missing ask the minibuffer
        for it.;
        else
        string fname = stream_cast<string, string>(FuncSlot[1]);

and we can then have an exception if FuncSlot[1] is not convertible to
string. (ok ok I know bad example)

        Lgb

Reply via email to