Hello all,

I realize that this has been addressed before, but I cannot figure out what to do in my situation.

I am using an osg function to replace one node with another, but my problem is unrelated to osg--I am having problems figuring out how to call a function.

The relevant code is as follows:
Code:
class ToolReplaceNode: public FileSelTool {			//attempt to create .txt file by Catherine Peloquin 5-31-07
public:
    ToolReplaceNode():FileSelTool("replacenode") {}
    virtual void fileSelected(const char *n) {
		const std::string name = n;
		osg::Node *new_node = osgDB::readNodeFile(name);
		osg::Node *old_node = dynamic_cast<osg::Node *>(editor->getSelected());
		osg::Group::replaceChild(old_node, new_node);  //<---ERROR HERE

	}
	virtual Tool* clone() { return new ToolReplaceNode(); }
};
At the line osg::Group::replaceChild, I get the error "illegal use of non-static member function".

I know I am calling the function incorrectly, but how do I call it?

Thanks,
JackR