• 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
Syntax Coloring and NSTextStorage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Syntax Coloring and NSTextStorage


  • Subject: Syntax Coloring and NSTextStorage
  • From: Goldfish <email@hidden>
  • Date: Sat, 11 Jan 2003 18:53:19 -0500

Hello.

I'm trying to implement syntax coloring into a program of mine. I have several different methods, one to color single quotes, another for double quotes, another for comments, etc. All of them use NSTextStorage's addAttribute:value:range function, with NSForegroundColorAttributeName as the attribute. The problem is, when I call more than one of these methods, only the last one called "sticks" (i.e. if I call the double quote method after the single quote method, only the double quote method's coloring appears).
Any ideas why this is happening? Can I force the attributes of the TextStorage to stick between methods?

-Goldfish
Developer, FrakKalk, AlgeKalk, Perlidex, Xenophaquinox
http://homepage.mac.com/goldfish1
_______________________________________________
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.

  • Prev by Date: Talking to FirstResponder
  • Next by Date: Re: Fun with componentsSeparatedByString!
  • Previous by thread: Re: Talking to FirstResponder
  • Next by thread: Re: Syntax Coloring and NSTextStorage
  • Index(es):
    • Date
    • Thread