Well, of course it gave you an error. You didn't give it an object to use, you gave it a class! When you hooked up an outlet you were using a pointer to an actual object, not just a class. How is it supposed to know whether you have 1 or 100 instances of that class? You have to tell it what object to use. Maybe you have a program which has multiple windows open. Then how is it supposed to tell which controller to send it to unless you give it a specific object. In this case it sounds like you only have one windo but the same rules still apply.