Nicolas Cellier uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-nice.141.mcz==================== Summary ====================
Name: Tools-nice.141
Author: nice
Time: 11 November 2009, 7:27:03 am
UUID: 53223aaf-29e0-4ae8-88ae-7595b9d0645f
Ancestors: Tools-nice.140
Correct
http://code.google.com/p/pharo/issues/detail?id=1425an inspector wouldn't handle a variableSubclass with instance variables correctly
Also change a ((select:) detect:) construct, to rather use (detect: [and: []])
As said in the comment, the code already is ugly enough.
=============== Diff against Tools-nice.140 ===============
Item was changed:
----- Method: Debugger>>getTextMorphWithSelection (in category 'tally support') -----
getTextMorphWithSelection
"This is extremely ugly... We I need to get a reference of the code pane, which is not easily accessible"
+ ^self dependents
+ detect: [:m| (m isKindOf: PluggableTextMorph)
+ and: [m selectionInterval first > 1]]
+ ifNone: [nil]!
- ^ (self dependents select: [:m| m isKindOf: PluggableTextMorph])
- detect: [:m| m selectionInterval first > 1] ifNone: [nil]!
Item was changed:
----- Method: Inspector>>replaceSelectionValue: (in category 'selecting') -----
replaceSelectionValue: anObject
"The receiver has a list of variables of its inspected object. One of these
is selected. The value of the selected variable is set to the value,
anObject."
+ | basicIndex si instVarIndex |
- | basicIndex si |
selectionIndex <= 2 ifTrue: [
self toggleIndex: (si := selectionIndex).
self toggleIndex: si.
^ object].
+ instVarIndex := selectionIndex - 2.
+ instVarIndex > object class instSize
+ ifFalse: [^ object instVarAt: instVarIndex put: anObject].
+ object class isVariable or: [self error: 'Cannot replace selection'].
- object class isVariable
- ifFalse: [^ object instVarAt: selectionIndex - 2 put: anObject].
basicIndex := selectionIndex - 2 - object class instSize.
(object basicSize <= (self i1 + self i2) or: [basicIndex <= self i1])
ifTrue: [^object basicAt: basicIndex put: anObject]
ifFalse: [^object basicAt: object basicSize - (self i1 + self i2) + basicIndex
put: anObject]!