# HG changeset patch
# User Patrik Svestka <patrik.svestka@gmail.com>
# Date 1488966539 -3600
# Wed Mar 08 10:48:59 2017 +0100
# Branch jv
# Node ID 9417c310265a04aff456fa0bb0d3ad84976cb763
# Parent a294c60caf42b68bfcbb6fd4a7623f5354e48200
Issue #125: When a Collection contains spaces in a collection only partial key is copied in Tools::Inspector2
Fix in `InspectorView >> #selectedKeyName`
Copies the whole key from 1 character till the end.
The previous implementation copied only to the first space (copyUpTo:(Character space)) which is incorrect
when the actual value contains spaces. Results in only partial copy.
(note: Tried to mimic the previous behaviour using regexp (the current StX implementation is old and missing some
important features) and PEG (did not figure out how to correctly write it in PEG) but failed).
https://swing.fit.cvut.cz/projects/stx-jv/ticket/125
diff -r a294c60caf42 -r 9417c310265a InspectorView.st
a
|
b
|
|
4071 | 4071 | "/ careful: pseudo entries may have spaces in-between |
4072 | 4072 | (sel startsWith:'-') ifFalse:[ |
4073 | 4073 | "/ clip off the value-info string |
4074 | | sel := sel copyUpTo:(Character space). |
| 4074 | sel := sel copyFrom: 1. "/copies everything from the start to the end |
4075 | 4075 | ]. |
4076 | 4076 | ^ sel |
4077 | 4077 | ]. |
4078 | 4078 | ]. |
4079 | 4079 | ^ nil |
| 4080 | |
| 4081 | "Modified: / 08-03-2017 / 10:14:51 / svestkap" |
4080 | 4082 | ! |
4081 | 4083 | |
4082 | 4084 | suppressPseudoSlots |
… |
… |
|
4314 | 4316 | |
4315 | 4317 | version_CVS |
4316 | 4318 | ^ '$Header$' |
| 4319 | ! |
| 4320 | |
| 4321 | version_HG |
| 4322 | |
| 4323 | ^ '$Changeset: <not expanded> $' |
4317 | 4324 | ! ! |
4318 | 4325 | |
4319 | 4326 | |