[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: More NSOutlineView bugs
From: |
Fred Kiefer |
Subject: |
Re: More NSOutlineView bugs |
Date: |
Mon, 05 Feb 2007 20:47:20 +0100 |
User-agent: |
Thunderbird 1.5.0.9 (X11/20060911) |
Matt Rice schrieb:
> On 2007-02-05 09:04:47 -0800 Matt Rice <address@hidden> wrote:
>
>> On 2007-02-05 07:09:26 -0800 Matt Rice <address@hidden> wrote:
>>
>>> On 2007-02-04 09:19:24 -0800 Guenther Noack
>>> <address@hidden> wrote:
>>>
>>>> Hi!
>>>>
>>>> Playing around with outline drag&drop, I found some other
>>>> selection-related issues in NSOutlineView:
>>>>
>>>> - Inconsistency
>>>>
>>>> The NSOutlineView method -noteNumberOfRowsChanged forgets about the
>>>> case where only one item is allowed to be selected. This leads to
>>>> inconsistencies within NSTableView which result in wrongly selected
>>>> rows in outline views. It can be fixed by adding this code snippet
>>>> before the -setFrame call:
>>>>
>>>> if ([_selectedRows count] == 0) {
>>>> _selectedRow = -1;
>>>> } else {
>>>> _selectedRow = [_selectedRows lastIndex];
>>>> }
>>>>
>>>
>>> I really don't think that -noteNumberOfRowsChanged makes any sense
>>> for NSOutlineView
>>> because its a public method, and can be called seperate from -reloadData
>>> at the beginning it goes
>>>
>>> _numberOfRows = [_items count];
>>>
>>> If -reloadData is not called... this doesn't go to the delegate to
>>> get the new number of rows
>>> well it really cant in any good way which would be more optimal than
>>> reloadData,
>>> and I couldn't get this to do anything on a mac
>>
>> Ok so i think i'm going to recant this and there were problems with
>> the patch anyways...
>> it could be useful if you can get it to modify _items before calling
>> noteNumberOfRowsChanged then call setNeedsDisplayInRect: or something...
>>
>> attached is a new patch which just removes the _selectedObjects,
>> and removes the subclassed implementation of noteNumberOfRowsChanged
>> and implements a private method to make NSTableViews implementation
>> work with NSOutlineView.
>>
>
> forgot to attach it
>
> <NSOutlineView2.diff>
>
I haven't followed the rest of the discussion, but this patch looks fine
to me. Does it resolve all the issues that Guenther reported or are some
still outstanding?
Cheers
Fred
- More NSOutlineView bugs, Guenther Noack, 2007/02/04
- Re: More NSOutlineView bugs, Matt Rice, 2007/02/05
- Re: More NSOutlineView bugs, Matt Rice, 2007/02/05
- Re: More NSOutlineView bugs, Matt Rice, 2007/02/05
- Re: More NSOutlineView bugs,
Fred Kiefer <=
- Re: More NSOutlineView bugs, Matt Rice, 2007/02/05
- Re: More NSOutlineView bugs, Matt Rice, 2007/02/05
- Re: More NSOutlineView bugs, Fred Kiefer, 2007/02/06
- Re: More NSOutlineView bugs, Guenther Noack, 2007/02/10