RE: NSLayoutManager question
RE: NSLayoutManager question
- Subject: RE: NSLayoutManager question
- From: Koen van der Drift <email@hidden>
- Date: Wed, 5 Feb 2003 22:20:46 -0500
Hi,
I got the adding/removing of spaces all working now, thanks everyone for
their suggestions. I found it the easiest to just traverse the string
backwards and add a space at the correct positions, and use an NSScanner to
remove them.
However, there is one thing that is not working. I also use temporary
attributes to hilight certain characters in the string. This works well
when the string is not being edited. The problem comes when I add/remove
characters. I respond to the notification
NSTextStorageDidProcessEditingNotification to update the attributes of the
text. It turns out that the layoutmanager has not been informed yet at this
point that the textstorage has changed. So adding attributes end up at the
wrong characters.
So my questions are:
1. should I listen to another notification, or maybe use a certain delegate?
2. how can I inform the layoutmanager that the text has been changed, so
that it will have the correct number of characters?
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.