Re: NSTextView text coloring problem

2008-04-24 Thread Alastair Houghton
On 24 Apr 2008, at 16:10, Dave Jewell wrote: On 24 Apr 2008, at 8:42 am, Graham Cox wrote: Aside: your ivars shouldn't start with an underscore - Apple reserves such names for its own classes. Interesting - I was unaware of that convention. Dietmar Planitzer provides something of an

Re: NSTextView text coloring problem

2008-04-24 Thread John Stiles
Is the $ usage an extension? That doesn't sound like regular C to me. Alastair Houghton wrote: On 24 Apr 2008, at 16:10, Dave Jewell wrote: On 24 Apr 2008, at 8:42 am, Graham Cox wrote: Aside: your ivars shouldn't start with an underscore - Apple reserves such names for its own classes.

Re: NSTextView text coloring problem

2008-04-24 Thread Alastair Houghton
On 24 Apr 2008, at 18:17, John Stiles wrote: Is the $ usage an extension? That doesn't sound like regular C to me. Well it's implementation defined, if that's what you mean, yes. I think KR allowed it, then ANSI disallowed it---I think (this is all from memory)---but C99 allows any

NSTextView text coloring problem

2008-04-23 Thread tyler durden
Hi Everybody, I am reposting this since I haven't got any answers, yet. Hope somebody helps this time around. I am writing an easy chat application. I have an object of NSTextview on my UI form. I want to change the text color in a specified range from default color black to red. I used the

Re: NSTextView text coloring problem

2008-04-23 Thread Jean-Daniel Dupas
Look like you text view does not allow rich text. Make sure the Allow Rich Text check box is checked in your TextView config in IB or set it programaticaly using -[NSTextView setRichText:] - (void)setRichText:(BOOL)flag “Controls whether the text views sharing the receiver’s layout

Re: NSTextView text coloring problem

2008-04-23 Thread Graham Cox
On 24 Apr 2008, at 8:19 am, tyler durden wrote: Any suggestions ? IBOutlet NSTextView* _view; [(_view) setTextColor:[NSColor redColor] range: NSMakeRange(1,5)]; You can just set the fore-colour attribute on the text itself: (typed into Mail) [[_view textStorage]