• 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: Changing up/down arrow behavior for NSTextField
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing up/down arrow behavior for NSTextField


  • Subject: Re: Changing up/down arrow behavior for NSTextField
  • From: Douglas Davidson <email@hidden>
  • Date: Wed, 13 Feb 2008 10:34:32 -0800


On Feb 13, 2008, at 9:58 AM, Joshua Emmons wrote:

You don't want to override these methods directly in your field editor because you might require different behavior for each field in your app and the same field editor is used for all of them. But remember that the text field that is being edited is the field editor's delegate. So you can implement the delegate method - textView:doCommandBySelector: in your text field and do the work there instead.

I have just one thing to add: instead of subclassing NSTextField and overriding textView:doCommandBySelector:, it may be easier to just supply a delegate to the text field and implement the text field delegate method


- (BOOL)control:(NSControl *)control textView:(NSTextView *)textView doCommandBySelector:(SEL)commandSelector;

instead.

Douglas Davidson

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Changing up/down arrow behavior for NSTextField (From: Duncan Champney <email@hidden>)
 >Re: Changing up/down arrow behavior for NSTextField (From: Joshua Emmons <email@hidden>)

  • Prev by Date: Re: Core Data: unidirectional relationships
  • Next by Date: Re: Cocoa-dev Digest, Vol 5, Issue 219
  • Previous by thread: Re: Changing up/down arrow behavior for NSTextField
  • Next by thread: Re: Changing up/down arrow behavior for NSTextField
  • Index(es):
    • Date
    • Thread