Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Mar 20, 2013, 10:16 AM   #1
jpeezy
macrumors member
 
Join Date: Feb 2010
Edit Specific Text In NSTextView

Say I have the string "this is a test, this is a test" in a textView. I only want the user to be able to edit the word "test" (both instances) and I need the textView to shrink and grow with what the user enters. I have a method that uses a regex to get the ranges (I'd imagine this isn't optimal, maybe NSScanner would be better?). Anyway, 2 problems I'm having. 1) The ranges need to be adjusted based on what the user enters. 2) ONLY the "test" ranges are editable.

I'm just looking for a bit of guidance in which classes to use. Will I need to use LayoutManager/TextContainers?

Thanks

Last edited by jpeezy; Mar 23, 2013 at 12:34 AM.
jpeezy is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
text edit document Jennseay Mac OS X 10.7 Lion 0 Sep 15, 2013 08:11 PM
Text Edit - Please Help Merkava_4 Mac Applications and Mac App Store 5 Aug 13, 2013 01:04 PM
ML Text Edit: No Save As doubledee OS X 10.8 Mountain Lion 4 Jul 14, 2013 06:33 PM
Text edit can't edit Html pages phobos OS X 5 Mar 27, 2013 12:43 PM
Text Edit and iCloud morphius111 OS X 10.8 Mountain Lion 5 Oct 13, 2012 03:00 AM

Forum Jump

All times are GMT -5. The time now is 01:43 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC