Wooo-hooo. Look at this that I had saved in my store of interesting stuff.

Now look at the date again!

(Nobody berate Lars for his comments recently about the name of the new 
FuncRequest class.)

Anyway, the reason for posting this is the very last comment. Is this still a 
possibility/needed/wanted? Is their an implementation? 

Angus


----------  Forwarded Message  ----------

Subject: LyXFunc/LyXAction
Date: 13 Oct 2000 15:48:08 +0200
From: [EMAIL PROTECTED] (Lars Gullik Bjønnes)
To: [EMAIL PROTECTED]

We should make a way to ensure that LyXFunc are called with the
correct number of arguments and also that the arguments are of the
correct type. I think I have a nice solution for this...first we
change the LyXFunc::dispatch to a different type of arg...

LyXFunc::dispatch(FuncSlot const & funcslot);

where funcslot is something like:

class FuncSlot {
public:
        FuncSlot(string const & func);
        FuncSlot & arg(string const & a);
private:
        string func_;
        vector<string> argList;
};

to be used like this:

lyxfunc.dispatch(FuncSlot("buffer-new").arg("newfile"));

It is also easy to enhance this so that arg can take any type.
(see next mail about stream_cast<>)

        Lgb

-------------------------------------------------------

Reply via email to