• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Keyboard Events in Modal NSWindow (Part 2)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Keyboard Events in Modal NSWindow (Part 2)
      • From: Jason Barker <email@hidden>
References: 
 >Keyboard Events in Modal NSWindow (From: Jason Barker <email@hidden>)
 >Re: Keyboard Events in Modal NSWindow (Part 2) (From: Jason Barker <email@hidden>)

  • Prev by Date: NSUndoManager and undo history
  • Next by Date: Re: Keyboard Events in Modal NSWindow (Part 2)
  • Previous by thread: Re: Keyboard Events in Modal NSWindow (Part 2)
  • Next by thread: Re: Keyboard Events in Modal NSWindow (Part 2)
  • Index(es):
    • Date
    • Thread