Cuis-Smalltalk / Cuis-Smalltalk-Dev

Active development of Cuis Smalltalk
MIT License
433 stars 71 forks source link

[bug] object explorer issues with 'monitor changes' #204

Closed nmingotti closed 2 years ago

nmingotti commented 2 years ago

make an orderedCollection and explore it. Then right click the explore widget and select 'monitor changes'. => Debugger opens.

Posted to mailing on 27-Aug-2021.

ghost commented 2 years ago

Test:

"Do line by line:"
c _ 1 to: 20 :: asOrderedCollection.
c explore.
"Select root in the explorer and start monitoring it."
c becomeForward: (-20 to: 0)

Fix:

'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 ]! !
ghost commented 2 years ago

I still wonder why the exception handler on the last line does not catch this error.

ghost commented 2 years ago

Looking at the exception class hierarchy I now understand why the error handler does not catch the exception signaled.

nmingotti commented 2 years ago

this has been corrected