[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: NSOutlineView initialization and -itemAtRow: patch
From: |
Fred Kiefer |
Subject: |
Re: NSOutlineView initialization and -itemAtRow: patch |
Date: |
Sat, 08 Mar 2008 00:57:04 +0100 |
User-agent: |
Thunderbird 2.0.0.9 (X11/20070801) |
Applied.
Thank you Quentin!
Quentin Mathé wrote:
> Hi,
>
> Here is a patch that corrects -itemAtRow: to return nil when no row
> exists for the given index (that's Cocoa behavior).
> This patch also tries to clean the initialization of NSOutlineView since
> the ivars aren't initialized to the same values when you create the
> outline view in Gorm or in code by calling -initWithFrame:. For example,
> setting _indentationForLevel by default isn't really useful. Precisely
> -initWithFrame: sets the value to zero when -initWithCoder: sets it to
> 10. On Cocoa side, the value is equal to 16 in both cases.
> NSTableView tries to share initialization code in a similar way with
> -_initDefaults. However I have been unable to find an interface
> declaration for -_initDefaults, I suppose there is one somewhere?…
> because the compiler doesn't produce any warnings for NSTableView. I
> mention this, because in the patch -_initOutlineDefaults is a bit far
> away from -initWithFrame: unlike -_initDefaults in NSTableView.m. I
> think it would be better to keep these methods rather close.