• 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
how to insert a NSAttributedString into a NSTextview ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how to insert a NSAttributedString into a NSTextview ?


  • Subject: how to insert a NSAttributedString into a NSTextview ?
  • From: Jérémie Banier <email@hidden>
  • Date: Sat, 25 Dec 2004 21:22:24 +0100

Hello,

I'm pretty new to cocoa and I would like to know how you can insert an Attributed string into a NSTextView ...
I was expecting the following to do some things but I does not do much ...

NSMutableString* s = [ NSMutableString stringWithFormat: @"0xlx:", fh?foff:(unsigned long)p ];
foff += sizeof(ppc_word);
tempString = [tempString initWithString: s ];
[ tempString addAttribute: NSForegroundColorAttributeName
value: [NSColor blueColor]
range: NSMakeRange(0, [ s length ])];
[ myRTFTxt replaceCharactersInRange: NSMakeRange(0, [ [ myRTFTxt string ] length ])
withString: tempString ];

I would appreciate any comments, pointer, samples ...

Many thanks,
Jéré.



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: how to insert a NSAttributedString into a NSTextview ?
      • From: Jonathan Jackel <email@hidden>
    • Re: how to insert a NSAttributedString into a NSTextview ?
      • From: James Spencer <email@hidden>
  • Prev by Date: Re: Allocating memory in Cocoa
  • Next by Date: Re: Custom NSPopupButton
  • Previous by thread: Re: Allocating memory in Cocoa
  • Next by thread: Re: how to insert a NSAttributedString into a NSTextview ?
  • Index(es):
    • Date
    • Thread