Since recently in trunk, perhaps the last few weeks, I find that I
cannot revert to a previous version of a method from a VersionBrowser. The problem seems to be that #listSelections in the VersionBrowser is not being updated when I highlight one of the method versions in the browser window. Presumably some update mechanism has been disconnected between the PluggableListMorphPlus selections and the VersionBrowser model, but I cannot spot the problem. Can anyone think of a recent change that would cause this? Steps to reproduce: - In a SystemBrowser, select any method - Click the "versions" button to open a VersionsBrowser - The VersionsBrowser will display "Recent versions of <foo>" - Click one of the versions in the list to highlight it - Click the "revert" button Result: A UserDialogBoxMorph that says "nothing selected, so nothing done". Thanks, Dave |
As usual, the act of my hitting the <send> button on an email has caused
the question to answer itself. The problem is caused by the change to ChangeList>>toggleListIndex: that was introduced in Tools-mt.910. Reverting that method change makes method change reverting work again. I don't know what the correct fix should be, but no doubt I will think of it a few minutes after I hit the <send> button ;-) Dave On Wed, Nov 06, 2019 at 09:08:42PM -0500, David T. Lewis wrote: > Since recently in trunk, perhaps the last few weeks, I find that I > cannot revert to a previous version of a method from a VersionBrowser. > > The problem seems to be that #listSelections in the VersionBrowser is > not being updated when I highlight one of the method versions in the > browser window. Presumably some update mechanism has been disconnected > between the PluggableListMorphPlus selections and the VersionBrowser > model, but I cannot spot the problem. > > Can anyone think of a recent change that would cause this? > > Steps to reproduce: > > - In a SystemBrowser, select any method > - Click the "versions" button to open a VersionsBrowser > - The VersionsBrowser will display "Recent versions of <foo>" > - Click one of the versions in the list to highlight it > - Click the "revert" button > > Result: A UserDialogBoxMorph that says "nothing selected, so nothing done". > > Thanks, > Dave > > |
Hi Dave, there is interference between VersionsBrowser and its super class ChangeList. The model tries to simulate both single selection and multi selection in ChangeList. However, the former version of #toggleListIndex: is wrong because the view (or pluggable list) will implement toggle in a multi-selection setting. So, the excessive use of the inst-var "listSelections" (multi) makes it difficult to also consider "listIndex" (single). I will have a look at it. Seems like that multi-selection was patched into ChangeList only later. Sigh. Best, Marcel
|
Free forum by Nabble | Edit this page |