Comment #2 on issue 3423 by stephane.ducasse: Debugger little usability enh
http://code.google.com/p/pharo/issues/detail?id=3423

Name: Tools-fbs.287
Author: fbs
Time: 11 December 2010, 6:35:36.221 pm
UUID: bbe28059-3caf-0d40-8b0c-fdde8f969d45
Ancestors: Tools-fbs.286

This is a quick and dirty hack to address
http://bugs.squeak.org/view.php?id=7575. The right way is probably to have #selectedContext return nil if there's no context selected. Many places expect #selectedContext to return a non-nil value though.

So again: quick and dirty hack, and something better should be written that addresses the many places that assume that there's always a selected context.

=============== Diff against Tools-fbs.286 ===============

Item was changed:
 ----- Method: Debugger>>contents (in category 'accessing') -----
 contents
"Depending on the current selection, different information is retrieved. Answer a string description of that information. This information is the
       method in the currently selected context."

+       ^(contextStackIndex == 0)
+               ifTrue: [String new]
+               ifFalse: [contents ifNil:
+                       [self selectedContext
+                               ifNotNil: [self selectedMessage]
+                               ifNil: [String new]]] !
-       ^contents ifNil:
-               [self selectedContext
-                       ifNotNil: [self selectedMessage]
-                       ifNil: [String new]] !


Reply via email to