Fred Kiefer wrote:
On the road
Am 25.11.2013 um 02:10 schrieb Riccardo Mottola <[email protected]>:
On 11/24/13 12:41, Fred Kiefer wrote:
Oops, I wasn't aware of that. Yes of course, there is more to remove.
All that similar code in FSNTextCell that is never used. And in
FSNBrowserCell the fontAttr variable is a static although it is used by
different cells which might have different fonts. Obviously this isn't
going to work. I think it should just be a local variable in the
cuttitle method.
Yes it is dubious. It is however dynamically set in setFont, at least that.
Perhaps it is supposed that all cells will have the same font?
The method setFont: is an instance method, there is no guaranty that it will
always be the same for all cells.
I was still working on that part, I just commited it: fontAttr is now
directly initialized before usage and not put either in a static
variable, neither in an instance variable.
Is that what you thought? It may have a small speed penalty. I'm going
to check how many times the method gets called anyway, also to check if
IMP caching is really needed.
This method also doesn't take into account the paragraph style (writing
direction and alignment). You would need something like NSCells
_nonAutoreleasedTypingAttributes method for this, but this isn't public
and doesn't exist on Cocoa.
Are you referring to having file-names written right-to-left for example?
Well, that's perhaps a task for the future. First let's remove crashes and
optimize stuff.
The actual code wouldn't be any more complicated, just correcter.
I fear I still fail to understand you. Do you mean I don't get all the
necessary fontAttr and to do that I need o use something private? That's
bad.
ON the other hand, GWorkspace is not ported to Cocoa, so using a GS
specific extension wouldn't harm. Perhaps you can make a patch so I
understand? or a couple pf code lines pasted here.
Don't get me started on code reviewing these classes. You could get back
a lot more input than you could handle :-)
Not all a the same time. But there are several classes in FSNode that I want to
clean up and don't really know how :) Thus slowly... it will improve
Somehow you didn't pick up any of the suggestions I made, but tried some
different a bit dubious changes. Not sure what to make of that.
Except the IMP stuff thing where I am just trying to understand, what is
dubious? Removing the local font object completely? I think that's a
valid thing.
In the meanwhile, I cleaned up the unused dtslenght variable also in the
FSNTextCell class and will evaluate if also there fontAttr can be
calculated in place, simplifying initialization further.
Thank you,
Riccardo
_______________________________________________
Discuss-gnustep mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep