--- a/BrowserView.st Thu Oct 15 14:50:15 1998 +0200
+++ b/BrowserView.st Thu Oct 15 15:00:38 1998 +0200
@@ -11955,19 +11955,31 @@
varInspect
"open an inspector on the value of a classVar / classInstVar"
- |name searchClass |
+ |name searchClass dict|
name := variableListView selectionValue.
name isNil ifTrue:[^ self].
- (classInstVarsInVarList) ifFalse:[
- searchClass := currentClass whichClassDefinesClassVar:name.
- (searchClass classVarAt:(name asSymbol)) inspect
- ] ifTrue:[
- (currentClass instVarNamed:name) inspect.
- ].
-
- "Modified: / 16.6.1998 / 09:42:40 / cg"
+ showInstance ifTrue:[
+ "/ inspect an instVar
+ "/ create a dictionary of all instances with their current value there
+ dict := IdentityDictionary new.
+ currentClass allInstancesDo:[:i |
+ dict at:i put:(i instVarNamed:name).
+ ].
+ dict inspect
+ ] ifFalse:[
+ (classInstVarsInVarList) ifFalse:[
+ "/ inspect a classVar
+ searchClass := currentClass whichClassDefinesClassVar:name.
+ (searchClass classVarAt:(name asSymbol)) inspect
+ ] ifTrue:[
+ "/ inspect a classInstVar
+ (currentClass instVarNamed:name) inspect.
+ ].
+ ].
+
+ "Modified: / 15.10.1998 / 10:54:03 / cg"
!
varRefsOrModsTitle:title access:accessor mods:mods
@@ -12175,7 +12187,7 @@
).
].
- (showInstance not and:[variableListView hasSelection]) ifTrue:[
+ ("showInstance not and:["variableListView hasSelection"]") ifTrue:[
items := items , #(
('inspect' varInspect)
).
@@ -12195,7 +12207,7 @@
].
^ m
- "Modified: / 7.8.1998 / 17:14:48 / cg"
+ "Modified: / 15.10.1998 / 10:51:17 / cg"
!
variableSelection:lineNr
@@ -12543,6 +12555,6 @@
!BrowserView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.455 1998-10-09 14:15:46 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.456 1998-10-15 13:00:38 cg Exp $'
! !
BrowserView initialize!