• 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
hints for working with text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

hints for working with text


  • Subject: hints for working with text
  • From: Sly Upah <email@hidden>
  • Date: Wed, 18 Dec 2002 10:23:42 CST

I am beginning to think about a project off in the future I may want to
do. I want take a string of text with special sequences in them
such as:
this is normal @bold(make this bold) but this is not bold
@italic(this is italics) @bold(this is bold)
@color(red)this is red @color(blue)now we're blue

and translate these to a displayable string in a Cocoa window. The "@"
indicates the action to take upon the string. I'm not concerned
about how to parse the string, I can do that, the question is how
to make an NSString do what I'm hoping for...color, bold, italics, etc
One step farther is to utilize functions "@large" or "@small" which
incr/decr font size...I'm guessing setFont could be used for this.
I'm guessing setTextColor could be used for color. Perhaps setFont
for bold and italics as well. OK, if I'm onto this, how do you take the
string apart and recontruct it presuming I'm onto this? Do I utilize
a string text replacement call?

I'm wondering where to start, what to read. Any code or pointers to similar
examples would be most appreciated.
Happy Holidays,
Sly
_______________________________________________
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: hints for working with text
      • From: Douglas Davidson <email@hidden>
    • Re: hints for working with text
      • From: Saratchandra Kongara <email@hidden>
    • Re: hints for working with text
      • From: Zoe Test <email@hidden>
  • Prev by Date: NSToolbar in Preferences Panel
  • Next by Date: Re: hints for working with text
  • Previous by thread: Re: NSToolbar in Preferences Panel
  • Next by thread: Re: hints for working with text
  • Index(es):
    • Date
    • Thread