gnustep-dev
[Top][All Lists]
Advanced

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

Re: [Gnustep-cvs] r32503 - in /libs/gui/trunk: ChangeLog Headers/AppKit/


From: Richard Frith-Macdonald
Subject: Re: [Gnustep-cvs] r32503 - in /libs/gui/trunk: ChangeLog Headers/AppKit/NSLayoutManager.h Source/NSLayoutManager.m
Date: Thu, 10 Mar 2011 08:15:11 +0000

On 9 Mar 2011, at 18:38, Fred Kiefer wrote:

> Am 09.03.2011 06:28, schrieb Eric Wasylishen:
>> Author: ericwa
>> Date: Wed Mar  9 06:28:47 2011
>> New Revision: 32503
>> 
>> URL: http://svn.gna.org/viewcvs/gnustep?rev=32503&view=rev
>> Log:
>> gui: implement NSLayoutManager temporary attributes
>> 
>> Modified:
>>    libs/gui/trunk/ChangeLog
>>    libs/gui/trunk/Headers/AppKit/NSLayoutManager.h
>>    libs/gui/trunk/Source/NSLayoutManager.m
> 
> Excellent change! During FOSDEM Richard and I discussed about extracting
> the basic attribute handling from NSAttributedString to allow
> implementing temporary attribute handling on top of that. But your
> solution is a lot more elegant than that.

I agree that this a an elegant and simple solution ... but it's also very 
fragile as it depends on an implementation detail of NSMutableAttributedString 
(the fact that it happens to create its internal string storage using the 
-mutableCopy method of the string passed to its initialiser) rather than a 
guaranteed/documented behavior.  I'll add comments in the source code to remind 
us about this.

So I think your idea of creating a new class to store attributes in ranges 
without a string behind it is still a good one in the long run.




reply via email to

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