DebugView.st
changeset 651 b8a14e281c24
parent 646 04dafb2560bf
child 654 dac2634ce5ec
--- a/DebugView.st	Fri Jun 28 21:26:59 1996 +0200
+++ b/DebugView.st	Fri Jun 28 23:48:59 1996 +0200
@@ -1316,15 +1316,25 @@
 !
 
 browse
-    |w cls|
-
-    w := selectedContext method who.
-    cls := w at:1.
-"/ cls printCR.
-    cls browserClass openInClass:cls selector:(w at:2).
+    |mthd w sel cls|
+
+    mthd := selectedContext method.
+    mthd notNil ifTrue:[
+        w := selectedContext method who.
+        w notNil ifTrue:[
+            cls := w at:1.
+            sel := w at:2.
+        ]
+    ].
+    cls isNil ifTrue:[
+        "/ class not found - try receiver
+        cls := selectedContext receiver class
+    ].
+
+    cls browserClass openInClass:cls selector:sel.
 
     "Created: 22.11.1995 / 21:27:01 / cg"
-    "Modified: 20.5.1996 / 10:28:16 / cg"
+    "Modified: 28.6.1996 / 17:33:50 / cg"
 !
 
 browseClass
@@ -2571,5 +2581,5 @@
 !DebugView  class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.92 1996-06-28 13:55:39 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.93 1996-06-28 21:48:59 cg Exp $'
 ! !