gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with isRichText message


From: David Chisnall
Subject: Re: Problem with isRichText message
Date: Sat, 12 Nov 2011 11:32:12 +0000

On 11 Nov 2011, at 23:55, Fred Kiefer wrote:

> On 10.11.2011 15:12, Slex wrote:
>> Morning,
>> after some tests, with some softwares, i found that NSTextView returns
>> NO from isRichText, even when it contains rich text.
>> 
>> A GNUstep problem?
> 
> Most likely it is a GNUstep problem, whom else could we blame?
> 
> When an NSTextView is created it should be set to isRichText, where did yours 
> get set to NO? And when we load text into the text view by setting the text 
> storage directly we again need to tell the text view whether this is rich 
> text or not. I think Ink is doing this wrong, but then we should check on 
> Cocoa, how this gets handled there.

Slex is refactoring / improving XMPPKit and StepChat (the Jabber framework / 
client that was my teach-yourself-Objective-C project, and so contains some 
horrible code).  The NSTextView is loaded from a (Cocoa) nib file.  It has 
allows rich text set in the nib, and it does actually contain rich text (when 
he deleted the if ([textView isRichText]) check, we got an attributed string 
containing a load of attributes.  So, I suspect that this may be two bugs 
working together:

1) Not setting the property from the nib
2) Allowing rich text attributes to be inserted into a text view that does not 
have the isRichText flag set

If this flag is not set, then bringing up the font and colour panels should not 
permit him to insert rich text into the chat box.  If this flag is set, then 
-isRichText should return YES.

David

-- Sent from my IBM 1620




reply via email to

[Prev in Thread] Current Thread [Next in Thread]