• 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
Displaying color code in stead of colored text?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Displaying color code in stead of colored text?


  • Subject: Displaying color code in stead of colored text?
  • From: Chewtoy <email@hidden>
  • Date: Mon, 24 Nov 2003 13:25:06 -0800

ok so i have a TableView that is displaying some attributed text here
is the code but instead of displaying the text it displays the NSColor
code info?

NSColor *grey = [NSColor colorWithCalibratedRed:0.610 green:0.610
blue:0.610 alpha:1.0];

if ((![workAddr isEqualToString:@""])) {
NSMutableAttributedString *aStr;
aStr = [[[NSMutableAttributedString alloc]
initWithString:[NSString stringWithFormat:@"%@ (work)",workAddr]]
autorelease];
[aStr
addAttribute:NSForegroundColorAttributeName value:grey
range:NSMakeRange([aStr length]-6,6)];
[mDict setObject:[NSString
stringWithFormat:@"%@\email@hidden",aStr] forKey:@"email"];
}

am i doing something wrong or is this a bug?

is displaying: {}(home){ NSColor *grey = NSColor
colorWithCalibratedRed:0.610 green:0.610 blue:0.610 alpha:1.0; }
_______________________________________________
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: Displaying color code in stead of colored text?
      • From: "Jonathan E. Jackel" <email@hidden>
  • Prev by Date: NSTextView fun fun fun!
  • Next by Date: Re: dealloc of App Contoller never gets called
  • Previous by thread: NSTextView fun fun fun!
  • Next by thread: RE: Displaying color code in stead of colored text?
  • Index(es):
    • Date
    • Thread