gnustep-dev
[Top][All Lists]
Advanced

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

[PATCH] NSOutlineView lazy loading of the outline item tree


From: Quentin Mathé
Subject: [PATCH] NSOutlineView lazy loading of the outline item tree
Date: Sat, 8 Mar 2008 17:08:01 +0100

Hi,

Here is a new NSOutlineView patch that implements the lazy loading of the outline items. Until now NSOutlineView entered in an endless recursion on browsing a file system or a not-so-small object graph (by trying to create outline items for all the files for example). This patch modifies _loadDictionaryStartingWith: to only load expanded items. _openItem: has been updated to check whether the item needs to be loaded (or reloaded) before retrieving the children of the item and inserting them as cells. If the children haven't been loaded, - _loadDictionaryStartingWith: will be called for the given item which is getting expanded/open.
This patch is based on Cocoa behavior.
As a side note, I found this code a bit hard to read, for example having better names for variables rather than item, sitem, startitem could help. However I don't know which names could work better :-/

Attachment: NSOutlineView.m.patch
Description: Binary data




Cheers,
Quentin.

reply via email to

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