On 5 Jul 2007, at 00:46, Yen-Ju Chen wrote:

>   Do you have a quick way to reproduce the bug ?
>   A small program or a description how to write one to reproduce  
> the bug.
>   If so, I can take a look and see what I can do.

I don't, but it should be possible to write one.  Populate an  
NSOutlineView with data and then remove some of the items from the  
data source and tell it to reload an item.  It also seems to crop up  
when you collapse a group in StepChat (which is just plain odd).   
Looking at the code, it seems that there are several ways in which  
these two values can get out of sync.  I patched a couple of them in  
my copy of GNUstep, and I'll have a look for the rest later.

The problem seems to be that NSOutlineView doesn't use _numberOfRows  
much itself, but methods which call self in NSTableView do to check  
the number of rows, and in the sub-class the methods called from this  
cause breakage.

The 'fix' I posted more or less works; it makes the view do the right  
thing, but not in a very efficient way (it now doesn't matter when  
they two get out of sync, because it can handle that case, but having  
them get out of sync in the first place is wrong).

You can try pointing a debugger at StepChat, walking up the stack  
trace, and seeing where _numberOfRows is one more than [_items  
count]; that's the condition that causes breakage.

David

_______________________________________________
Etoile-dev mailing list
[email protected]
https://mail.gna.org/listinfo/etoile-dev

Reply via email to