NSLayoutManager question
NSLayoutManager question
- Subject: NSLayoutManager question
- From: Koen van der Drift <email@hidden>
- Date: Mon, 3 Feb 2003 16:37:58 -0500
Hi,
In my app I display a sequence of letters (aminoacids in a protein).
To make the string more readable, a common feature in many apps is to
add a space after each ten amino acids. So last night I was trying to
add this feature. What I did was each time the sequence is edited, I
remove all spaces and then I iterate the string backwards and add a
space in the correct position. This works. However, I also need the
string *without* the spaces for calculations, such as pattern
matching, or molecular weight calculation.
Then it occurred to my that I was trying to manipulate the model
(protein string) in the view (MyNSTextView), so I was wondering if I
can, and how, do the spaces by using the NSLayoutManager. Another
thing I could do is to keep a copy of the protein around *without*
the spaces that I use for the calculations, and use the 'original'
string of the NSTextView for the display.
Any suggestions on this?
thanks,
- Koen.
_______________________________________________
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.