Proper use of Windows, Views and Key Events
Proper use of Windows, Views and Key Events
- Subject: Proper use of Windows, Views and Key Events
- From: Tyler Keating <email@hidden>
- Date: Thu, 04 Aug 2005 10:03:41 -0600
Hi,
I'm just getting my feet wet with Cocoa development (and development in general) and I can't seem to get my head straight on a few things that I'm sure you would consider trivial. Namely, I want to make an application that runs full screen (fine) and accepts controls from the keyboard (um.. okay I think), but I keep getting lost between events, action messages, mouse events, responder chains, key this and key that... etc... While waiting for my revelation, I'm hoping someone can put my feet on the right path.
My questions are:
1. I have a custom view instance in IB, filled with other IB view objects, which I've set to a custom class in my project. I create a full screen window in my controller object and set the custom view as the content view of the new full screen window. Does this make sense? Do I also need to programmatically set up the responder chains?
2. If I set up the full screen window initially for a main menu type of page and the user chooses to enter a specific section, should I be changing the content view of the current window or should I be creating a new window? Again, is it okay to use a custom view containing all the buttons, tables, etc. from IB as the content view of my window?
3. I'm using the same custom view to handle key events. How do I correctly run an action in my controller object from my view object on a keyDown:? At the moment, I've tied the controller instance as an outlet in IB of the view instance so that I can access it directly and run the method in the controller object from the view object's keyDown: method. Is this wrong? Am I going to MVC hell?
Thanks for the help,
Tyler
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden