• 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
RE: NSLayoutManager question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: NSLayoutManager question
      • From: Douglas Davidson <email@hidden>
References: 
 >RE: NSLayoutManager question (From: "Jonathan E. Jackel" <email@hidden>)

  • Prev by Date: default Find Panel?
  • Next by Date: Printing an NSImage fit to page
  • Previous by thread: RE: NSLayoutManager question
  • Next by thread: Re: NSLayoutManager question
  • Index(es):
    • Date
    • Thread