Re: Keyboard Events in Modal NSWindow (Part 2)
Re: Keyboard Events in Modal NSWindow (Part 2)
- Subject: Re: Keyboard Events in Modal NSWindow (Part 2)
- From: Shawn Erickson <email@hidden>
- Date: Sat, 22 Apr 2006 15:09:26 -0700
On Apr 22, 2006, at 3:02 PM, Jason Barker wrote:
On Apr 22, 2006, at 9:27 AM, Jason Barker wrote:
I have a document-based application with a modal window. I want to
handle keyboard events with my modal window (which has a
delegate). How can I do this? Do I have to use a subclass of
NSWindowManager? What is the best route? I will have a few sheets
associated with this modal window. Any suggestions?
Thanks,
Jason
(Newbie frustrations...)
I've accomplished what I wanted to do but I'm sure that any
seasoned Cocoa/Objective-C developer will roll their eyes at this.
I took a NSButton from the controls palette in IB, put it on the
layout of my modal window, and created a command-keystroke combo
for it. Now, my modal window allows me to type command-Equals,
which is linked to an action. So that I can learn how it should be
done, can anyone tell me how I should have accomplished this?
Personally I am having a hard time understanding what you are trying
to do. What are you trying to do with keyboard input? What is the
target of this keyboard input? What is the purpose of the modal
window? (you really do mean modal right? [1])
So not really understanding what you are trying to do ... all I can
recommend is reviewing the following...
<http://developer.apple.com/documentation/Cocoa/Conceptual/
CocoaFundamentals/CoreAppArchitecture/chapter_7_section_6.html>
-Shawn
[1] <http://developer.apple.com/documentation/Cocoa/Conceptual/
WinPanel/Concepts/UsingModalWindows.html>
_______________________________________________
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