You cannot declare a method inside another method, it should be declared in the class declaration, probably in the protected section.
You are using wxSmith, so let it create the method and Connect() to it. Just add the wxTimer to your frame, select it, click on the curly brackets in the property grid and add an event handler.