• 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
Filtering NSTextField in a PreferencePane
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Filtering NSTextField in a PreferencePane


  • Subject: Filtering NSTextField in a PreferencePane
  • From: Eric Cole <email@hidden>
  • Date: Fri, 31 May 2002 23:27:13 -0700

What is the best way to capture keyDown events in a PreferencePane. I am a cocoa newbie, so any suggestions are appreciated. The normal way, to override the NSWindow -fieldEditor:forObject does not seem to apply, because I dont want to affect the whole window, and I dont know how to override a method for an existing window only part of the time. What is a delegate and how would it be used here?

The point of the edit field in the preference pane is to set keyboard equivalents, so I want the source keycode and modifiers, not the translated character. Is there any sample code for gathering this in a cocoa preference pane? It would be relatively easy in a separate window, but I would rather not do that.

I must say that, design wise, it seems like an odd choice to prohibit a text field from filtering its own input without help from a window or other external class. doesn't that defeat the purpose of making it an object?

Thanks
Eric
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Protocols with Categories?
  • Previous by thread: Re: Protocols with Categories?
  • Index(es):
    • Date
    • Thread