• 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
Using control:textView:doCommandBySelector
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using control:textView:doCommandBySelector


  • Subject: Using control:textView:doCommandBySelector
  • From: Duncan Champney <email@hidden>
  • Date: Mon, 11 Feb 2008 15:11:21 -0500

I must confess, I don't get Cocoa bindings. I've used them for user defaults, and that's it.


My app has a number of NSTextField/slider pairs for inputting numeric values. I'd like to support having the up and down arrow keys increase/ decrease my values by a set amount, and having shift up/down arrow increase/decrease by 10x that amount. (much like PhotoShop does.)


I could do this by subclassing NSTextField and adding a new -keyDown method that handled the up and down arrow keys.The control:textView:doCommandBySelector method seems like a more elegant way to make this work. However, I have no clue how to set up key bindings for my control fields in IB, and can't find any documentation to explain what I need to do.

In addition to needing some specific guidance on this particular issue, I'd also like to know a good reference (online or print) that explains using Cocoa bindings clearly, including working code examples? Most of the print manuals I use don't cover this subject.

Thanks in advance for any help you can offer.



Regards,


Duncan Champney _______________________________________________

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


  • Prev by Date: Re: nspopupbuttoncell attribs
  • Next by Date: Here is code to Convert RGB <-> HSB
  • Previous by thread: Re: [ANN] New Core Data Tutorials
  • Next by thread: Here is code to Convert RGB <-> HSB
  • Index(es):
    • Date
    • Thread