Quote Originally Posted by apffal View Post
However, when compiling, I get, for those 4 other functions, a "query not declared in this scope" error.
How to solve this ?
As shown in your code "query" is declared as a local variable inside search method ( in the stack ), so in all the other methods you are trying to use an undeclared variable.

You MUST declare query as a member of the class, like a global variable, but inside the class itself.

Try declaring it i.e. on the private or protected section of class declaration, at it must work fine.