--- a/MiniInspector.st Tue Mar 12 22:39:49 2019 +0100
+++ b/MiniInspector.st Tue Mar 12 22:45:37 2019 +0100
@@ -16,7 +16,7 @@
"{ NameSpace: Smalltalk }"
Object subclass:#MiniInspector
- instanceVariableNames:'inspectedObject commandArg inputStream'
+ instanceVariableNames:'inspectedObject commandArg inputStream level'
classVariableNames:''
poolDictionaries:''
category:'System-Debugging-Support'
@@ -61,22 +61,39 @@
!MiniInspector class methodsFor:'instance creation'!
openOn:anObject
- ^ self openOn:anObject input:nil
+ ^ self openOn:anObject input:nil level:1
+
+ "Modified: / 12-03-2019 / 22:43:53 / Claus Gittinger"
!
openOn:anObject input:inputStreamOrNil
+ ^ self openOn:anObject input:inputStreamOrNil level:1
+
+ "Modified: / 12-03-2019 / 22:44:15 / Claus Gittinger"
+!
+
+openOn:anObject input:inputStreamOrNil level:level
|anInspector|
anInspector := (self new) initializeFor:anObject.
anInspector inputStream:inputStreamOrNil.
+ anInspector level:level.
anInspector enter.
^ anInspector
+
+ "Created: / 12-03-2019 / 22:43:39 / Claus Gittinger"
! !
!MiniInspector methodsFor:'accessing'!
inputStream:something
inputStream := something.
+!
+
+level:anInteger
+ level := anInteger.
+
+ "Created: / 12-03-2019 / 22:44:26 / Claus Gittinger"
! !
!MiniInspector methodsFor:'private'!
@@ -100,7 +117,7 @@
[true] whileTrue:[
valid := false.
- cmd := self getCommand:'inspector> '.
+ cmd := self getCommand:'inspector',level printString,'> '.
cmd isNil ifTrue:[ "/ EOF -> quit
cmd := $q
].
@@ -191,13 +208,13 @@
N <N> .. nil instvar <N> (N=1..)
* ...... becomeNil and quit (dangerous)
- q ...... quit
+ q ...... quit (or back to previous level)
' _errorPrintCR
]
].
"Modified: / 03-02-2014 / 10:19:46 / cg"
- "Modified: / 12-03-2019 / 22:39:34 / Claus Gittinger"
+ "Modified: / 12-03-2019 / 22:45:24 / Claus Gittinger"
!
enter