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

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.

  • Follow-Ups:
    • RE: NSLayoutManager question
      • From: "Jonathan E. Jackel" <email@hidden>
  • Prev by Date: Re: Determining if images are roughly equal
  • Next by Date: Hidden Objects
  • Previous by thread: Re: Doc search strategy
  • Next by thread: RE: NSLayoutManager question
  • Index(es):
    • Date
    • Thread