Gykonik: That's coz the class
Editbox is defined in another header file. To use it, you'll have to add:
to the top of the file "Spinner.h". But don't do that! Coz u have a deeper problem. In general, methods should be declared in the header file (i.e. a ".h" file) (inside the class definition, of course), but be defined in a source file (i.e., a ".cpp" file). Otherwise, if the header file is included by several source files, from the compiler's perspective the method would be defined multiple times, which is an error.
So that means u should leave the declaration:
inside the definition of the class
Spinner (in the file "Spinner.h"), but move the definition (i.e. the method's body):
Code: Select all
bool Spinner::isEditboxActive() const {
return getEditbox()->isActive();
}
to the source file (i.e. "Spinner.cpp"). Then everything should work fine. You
don't have to add:
to the file "Spinner.cpp" coz it already includes that file.