Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NSOutlineView root item vs. nil #306

Open
rmottola opened this issue Oct 17, 2024 · 3 comments
Open

NSOutlineView root item vs. nil #306

rmottola opened this issue Oct 17, 2024 · 3 comments

Comments

@rmottola
Copy link
Member

The root item of an OutlineView is expected to be nil.
GNUmail (check MailboxManagerController.m reloadAllFolders) calls directly with the root item (in that case an array). Apple apparently deduplicates and works, while GNUstep will descend and expand first nil to the array and then put the array as first level item. Apple somehow "notices" they are the same. [NSOutlineView expandItem]

@gcasa
Copy link
Member

gcasa commented Oct 17, 2024

outlineViewLazyLoad

Here it calls the outlineView data source method with a different method than we do. We use expandItem: nil, they use _nonStaticDataSourceChild:ofItem:. While our implementation is functionally correct, and conforms to the documentation, this results in slightly different behavior. Also, I believe as mentioned above, Apple is deduplicating items per child, so they are only displayed once. Also see below... the data source is called with item = nil...

outlineViewLazyLoad2

@rmottola
Copy link
Member Author

I think we need to write a test if the duplication is being done per-item or only at the root level.

@gcasa
Copy link
Member

gcasa commented Oct 18, 2024

Tested our theory...
SameStringTest
It appears it is not deduplicated. I think what we have is good enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants