Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Text Processing in NSTextView




On Jun 30, 2005, at 11:14 AM, Ronnie O wrote:

Can anyone recommend an alternative that would allow me to grab the
keyDown event (in the case of character input, removal etc.) and
directly alter my dataString variable?  Then I could just format that
for display.  Then I would not need to de-format the data in the view.


Don't deal with the keyDown event directly. You don't know how it is going to alter the text. Try acting as the text view's delegate and handling -shouldChangeTextInRange:replacementString:, or in Tiger - shouldChangeTextInRanges:replacementStrings:.


Douglas Davidson

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Text Processing in NSTextView (From: Ronnie O <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.