[squeak-dev] Changeset: fix-generic-inspectOne-with-truncation.cs

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Fri May 14 14:29:50 UTC 2021


Hi all!


Jan Ehmueller and Fabio (fn) have discovered an Inspector bug with #inspectOne/"inspect element..." in the field list menu that hindered users from entering the index of a truncated element in the inspect element dialog. Possible ways to reproduce the issue include:


  *   Inspector openOn: (Array new: 1024) -> … -> Click -> 90 -> Enter
  *   (SmalltalkImage>>#snapshot:andQuit:withExitCode:embedded:) inspect -> right click self -> inspect element... -> 450 -> Enter (might depend on Sista)
  *   TruffleSqueak was also affected: https://github.com/hpi-swa/trufflesqueak/issues/143

The attached changeset attempts to fix the bug.

Changelog:

Problem: The variant of Inspector >> #inspectOne, as it is now in the trunk, fails if the key is the value for a field that has been truncated. Because in this place, explicitly only the keys of self fields are passed to #inspectOneOf: which are already truncated. The bug does not affect CollectionInspectors which passes the elementIndices directly to #inspectOneOf: without the need of having fields.
Solution: I have now essentially pushed this logic from CollectionInspector with #elementIndices up to Inspector. This should make it run again.

Please review and merge if you don't have any further objections. :-)

Best,
Christoph
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210514/75ab676d/attachment-0001.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fix-generic-inspectOne-with-truncation.1.cs
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210514/75ab676d/attachment-0001.ksh>


More information about the Squeak-dev mailing list