@@ -171,15 +171,26 @@ StRawInspectionPresenter >> step [
171
171
attributeTable updateRootsKeepingSelection: rootNodes
172
172
]
173
173
174
+ { #category : ' building' }
175
+ StRawInspectionPresenter >> updatePresenterTitle [
176
+ " Callback after changing a receiver's value (in a column for an instance variable). Update the window title and its header to display the new value"
177
+ | wp |
178
+
179
+ wp := self window presenter.
180
+ wp firstPage updateHeaderBar.
181
+ self window title: wp windowTitle
182
+ ]
183
+
174
184
{ #category : ' building' }
175
185
StRawInspectionPresenter >> valuesColumn [
176
186
177
187
^ SpStringTableColumn new
178
188
title: ' Value' ;
179
189
evaluated: #stringValue ;
180
- " beEditable;"
190
+ beEditable;
181
191
onAcceptEdition: [ :node :value |
182
- self inform: node label , ' =' , value asString " node value: value" ];
192
+ self write: node value: value.
193
+ self updatePresenterTitle ];
183
194
sortFunction: #stringValue ascending;
184
195
yourself
185
196
]
@@ -200,3 +211,13 @@ StRawInspectionPresenter >> variablesColumn [
200
211
sortFunction: #label ascending;
201
212
yourself
202
213
]
214
+
215
+ { #category : ' writing' }
216
+ StRawInspectionPresenter >> write: aStInspectorSlotNode value: aString [
217
+ " Update the value of aStInspectorSlotNode with new value aString.
218
+ Convert aString to the 'native' object parsing it as number or using parseLiterals (for booleans or strings)"
219
+
220
+ aStInspectorSlotNode slot
221
+ write: (NumberParser parse: aString onError: [ aString parseLiterals first ])
222
+ to: aStInspectorSlotNode hostObject
223
+ ]
0 commit comments