Minimizing Windows


cocoa love
Can anyone help me with this? I am currently building a project that has a custom window and custom view. What i need for it to do is to minimize. I've already tried adding my own buttons and hooking them up to the Application's Owner and then hooking them up to the actions "minimize" and "perform minimize" but neither one of them worked. They work with normal windows though. Someone please Help!