Andre Poenitz wrote:
On Thu, Oct 25, 2007 at 04:47:17PM -0400, Richard Heck wrote:
vitual CommandInfo const * findInfo(std::string const & cmdName) = 0;
I didn't do that because it needs, at least in the base classes, to be static, and I wanted to indicate here that it needed to be implemented as a static function. But of course "virtual static" is out, and so is "static blah =0". Thoughts?

[...]

Spoke too soon. This fails:
../../../src/insets/InsetCommand.h: In static member function 'static const lyx::CommandInfo* lyx::InsetCommand::findInfo(const std::string&)': ../../../src/insets/InsetCommand.h:83: error: cannot call member function 'virtual const lyx::CommandInfo* lyx::InsetCommand::doFindInfo(const std::string&)' without object I take it that the problem is that doFindInfo() is a member function being called from a static function, and so there is no `this'.

Ahem. Right. So do you have an object or not?

No. That's why the function has to be static.

rh

--
==================================================================
Richard G Heck, Jr
Professor of Philosophy
Brown University
http://frege.brown.edu/heck/
==================================================================
Get my public key from http://sks.keyserver.penguin.de
Hash: 0x1DE91F1E66FFBDEC
Learn how to sign your email using Thunderbird and GnuPG at:
http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto

Reply via email to