CPOutlineView selectedRow broken by change in issue #716 #725

Closed
samsonjs opened this Issue Jun 16, 2010 · 14 comments

Comments

Projects
None yet
6 participants
Contributor

samsonjs commented Jun 16, 2010

The change in gh-716 breaks CPOutlineView. _lastSelectedRow is not maintained properly and it looks like it's only updated when changing the selection with the mouse. Changing the selection programmatically causes -selectedRow to drift from the real value.

edit: Workaround is to use [[outlineView selectedRowIndexes] lastIndex], but _lastSelectedRow should probably be maintained in selectRowIndexes:byExtendingSelection:.

Contributor

Me1000 commented Jun 16, 2010

Would you mind putting together a quick reduction app? Just a simple appcontroller that changes the selection like you're doing and logs the selectedRow as well as what it SHOULD be :)

Contributor

Me1000 commented Jun 16, 2010

You're right that the tracking should be done elsewhere, which I've fixed here: http://github.com/280north/cappuccino/commit/7414d1407ff279b1fc1953024f96b62a2683fde0

however I'm not positive that'll fix your issue. Let me know if it does though.

Contributor

samsonjs commented Jun 16, 2010

Fast work, thanks! I had to modify it to use the last index of all selected rows (not just new ones) but it works, for me anyway. Commit is here: http://github.com/samsonjs/cappuccino/commit/d119fb8635744ac4700f427f05fb3666e4762f2e

Contributor

Me1000 commented Jun 16, 2010

That implementation is not correct though. I can confirm that -selectedRow always returns the last index of the last index set which was added to the selection (or replaces the last selection).

The implementation is correct in the tableview, but it seems like you're still having an issue with the outlineview, but I need a reduction.

Contributor

samsonjs commented Jun 16, 2010

Ok I've got a reduction here. A simple outline view that should maintain the selected row when items are expanded and collapsed. It might not be perfect but demonstrates the problem. It works using _selectedRowIndexes but not using rows. Hope this is enough, just let me know if you need anything else.

http://samhuri.net/CappuccinoIssue725.zip

Owner

aljungberg commented Apr 11, 2011

Looks like you took down the reduction. Could it be uploaded to GitHub?

Contributor

samsonjs commented Apr 11, 2011

cappbot commented May 9, 2012

Label: #new. What's next? A reviewer should examine this issue.

Contributor

ahankinson commented Feb 15, 2013

I think this is still an issue, but the reduction had a few bugs and I wasn't able to get it completely working.

-#new
+#needs-reduction
+#needs-confirmation

cappbot commented Feb 15, 2013

Labels: #needs-confirmation, #needs-reduction. What's next?

  • A minimal test app should be created which demonstrates the concern of this issue in isolation.
  • This issue needs a volunteer to independently reproduce the issue.

cappbot commented Feb 17, 2013

Milestone: Someday. Labels: #needs-confirmation, #needs-reduction. What's next?

  • This issue needs a volunteer to independently reproduce the issue.
  • A minimal test app should be created which demonstrates the concern of this issue in isolation.
Contributor

daboe01 commented Jun 30, 2014

i can confirm from CPOutlineViewTest that the selection of a sub-item is lost upon folding/unfolding.
however, this is expected and i see the same in cocoa.
+#works-for-me

cappbot commented Jun 30, 2014

Milestone: Someday. Labels: #needs-confirmation, #needs-reduction, #works-for-me. What's next? Attempts to reproduce the problem described by this issue have failed to reveal any erroneous situation.

@cappbot cappbot closed this Jun 30, 2014

cappbot commented Jun 30, 2014

Milestone: Someday. Labels: #needs-confirmation, #needs-reduction, #works-for-me. What's next? Attempts to reproduce the problem described by this issue have failed to reveal any erroneous situation.

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