Could please someone approve this so I can merge it into Squeak 6.0beta? :)<br>
<br>
Best,<br>
Christoph<br>
<br>
<font color="#808080">---<br>
</font><font color="#808080"><i>Sent from </i></font><font color="#808080"><i><a href="https://github.com/hpi-swa-lab/squeak-inbox-talk"><u><font color="#808080">Squeak Inbox Talk</font></u></a></i></font><br>
<br>
On 2022-05-20T11:41:38+00:00, commits@source.squeak.org wrote:<br>
<br>
> A new version of Tools was added to project The Inbox:<br>
> http://source.squeak.org/inbox/Tools-ct.1159.mcz<br>
> <br>
> ==================== Summary ====================<br>
> <br>
> Name: Tools-ct.1159<br>
> Author: ct<br>
> Time: 20 May 2022, 1:41:35.47049 pm<br>
> UUID: f2890075-119c-c948-bd42-93a392abcca9<br>
> Ancestors: Tools-mt.1158<br>
> <br>
> Fixes a tedious #codeChangedElsewhere bug in the class definition view of system browsers.<br>
> <br>
> The original bug report:<br>
> <br>
>     1. Open a browser on any method of any class.<br>
>     2. Change the source so that it contains a new - as yet undeclared - instance variable.<br>
>     3. Accept the new method and answer the "unknown variable" dialog with "declare instance variable".<br>
>     4. Click on the instance button of the browser.<br>
>     5. Try to type into the class definition or to reaccept it.<br>
>     <br>
>     The text cursor would jump to beginning of the text field every second until you started to type. After that, a red triangle would appear at the text field, and when you tried to accept the changes, a "may have been changed elsewhere" warning would appear.<br>
> <br>
> Cause:<br>
> <br>
>     Declaring the new instance variable converts the class into a new behavior instance, but the browser kept a reference on the prior version of the class. Thus Browser>>#didCodeChangeElsewhere answered true because of the divergent class definitions, but CodeHolder>>#updateCodePaneIfNeeded was unable to fix that divergence.<br>
> <br>
> Solution:<br>
> <br>
>     Add override Browser>>#updateCodePaneIfNeeded and send #setClassDefinition if necessary to apply the pending update.<br>
> <br>
> =============== Diff against Tools-mt.1158 ===============<br>
> <br>
> Item was added:<br>
> + ----- Method: Browser>>updateCodePaneIfNeeded (in category 'self-updating') -----<br>
> + updateCodePaneIfNeeded<br>
> + <br>
> +     super updateCodePaneIfNeeded.<br>
> +     <br>
> +     (self didCodeChangeElsewhere and: [self hasUnacceptedEdits not])<br>
> +         ifTrue:<br>
> +             [self setClassDefinition.<br>
> +             self contentsChanged].!<br>
> <br>