[Cuis-dev] [FIX] Object Explorer root monitoring fix
Gerald Klix
cuis.01 at klix.ch
Sat Aug 28 02:02:26 PDT 2021
Hi all, Hi Juan,
Nicola discovered a fault in the object-explorer.
Monitoring the root object did not work in some situations.
Please find attached a fix that fixes this.
There is also a GitHub issue:
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev/issues/204
HTH and Best Regards,
Gerald
-------------- next part --------------
'From Haver 5.0 [latest update: #4810] on 28 August 2021 at 10:52:04 am'!
!ObjectExplorerWrapper methodsFor: 'monitoring' stamp: 'KLG 8/28/2021 10:44:52'!
refresh
"hack to refresh item given an object and a string that is either an index or an instance variable name."
[ | index |
(model class allInstVarNames includes: itemName)
ifTrue: [ item _ model instVarNamed: itemName ]
ifFalse: [
itemName = 'root'
ifFalse: [
index _ itemName asNumber.
(index between: 1 and: model basicSize) ifTrue: [ item _ model basicAt: index]] ]
] on: UnhandledError do: [ :ex | item _ nil. ex return ]! !
More information about the Cuis-dev
mailing list