bug-gnustep
[Top][All Lists]
Advanced

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

Re: NSAttributedString in table data cells


From: Sašo Kiselkov
Subject: Re: NSAttributedString in table data cells
Date: Thu, 21 Jul 2005 08:57:27 +0200
User-agent: Internet Messaging Program (IMP) 3.2.5

Quoting Fred Kiefer <fredkiefer@gmx.de>:

> Hi Saso,
>
> Sa&#65533;o Kiselkov wrote:
> > I found that when my code returns an NSAttributedString as the value for a
> table
> > data cell it doesn't display it as an attributed string, but instead by
> sending
> > it "description" (which obviously isn't right, is it?). The problem is in
> the
> > code of NSCell's "-setObjectValue:" which doesn't know about attributed
> > strings. I'd recommend adding a test case there which, if passed an
> > NSAttributedString, invokes [self setAttributedStringValue: object];.
> >
>
> is this the behaviour on Cocoa? The change you suggest seems sensible to
> me (and rather simple to implement), but I would like to be sure we do
> the same as Apple here.
>
> Fred
>

Even if it didn't exist in Cocoa, it isn't an incompatible change where we would
solve a particular problem in an incompatible way - we'd simply extend the basic
concept to be more intelligent and behave more as people would expect it - to be
able to use attributed and nonattributed strings interchangeably in controls.
The only difference for an app programmer would be: "this one's a plain string
and this one's a fancy string".

I've attached a patch to NSCell.m (diff'ed against the latest CVS version) which
should do it.

Regards
 Saso

Attachment: NSCell.patch
Description: Binary data


reply via email to

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