gnustep-dev
[Top][All Lists]
Advanced

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

NSOutlineView initialization and -itemAtRow: patch


From: Quentin Mathé
Subject: NSOutlineView initialization and -itemAtRow: patch
Date: Fri, 7 Mar 2008 15:43:48 +0100

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.

Attachment: NSOutlineView.m.patch
Description: Binary data




Cheers,
Quentin.

reply via email to

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