kitts a écrit :
> In my experimentation i have added a class and in its class and im trying to
> tie one of its member variables to the property tree so that the user can
> read and modify its value. In the constructor i am using the code;
>
> fgTie("/path/to/my/var", this,
> &MyClass::getter,
> &MyClass::setter);
>
> getter and setter are member functions defined in the class header;
>
> int getter(){return m_value;}
> void setter(int value){m_value = value;}
>
> When compiling i get the following error:
>
> error: no matching function for call to ‘fgTie(const char [16], MyClass*
> const, int (MyClass::*)(), void (MyClass::*)(int))’
>
> What am i doing wrong? What is the right method to achieve what i intend? I
> have included <Main/fg_props.hxx>
>
try :
int getter() const {return m_value;}
void setter(int value){m_value = value;}
-Fred
--
Frédéric Bouvier
http://my.fotolia.com/frfoto/ Photo gallery
http://fgsd.sourceforge.net/ FlightGear Scenery Designer
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel