commit 90758ff4e514d5ab73c750ec52e47a39a3508e49
parent ca576ca4858353852ba12bf1f18ac86497808cee
Author: Ryan Culpepper <ryanc@racket-lang.org>
Date: Thu, 1 Feb 2007 23:18:19 +0000
Macro stepper: nicer looking syntax snip props view
svn: r5535
original commit: 2f4e4df213fe496778dd9c041d25b250a5c2effe
Diffstat:
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/collects/macro-debugger/syntax-browser/properties.ss b/collects/macro-debugger/syntax-browser/properties.ss
@@ -37,8 +37,9 @@
(lock #f)
(begin-edit-sequence)
(erase))
- (when (syntax? selected-syntax)
- (refresh/mode mode))
+ (if (syntax? selected-syntax)
+ (refresh/mode mode)
+ (refresh/mode #f))
(send* text
(end-edit-sequence)
(lock #t)
@@ -49,7 +50,7 @@
(case mode
((term) (send pdisplayer display-meaning-info selected-syntax))
((stxobj) (send pdisplayer display-stxobj-info selected-syntax))
- ((#f) (void))
+ ((#f) (send pdisplayer display-null-info))
(else (error 'properties-view%:refresh "internal error: no such mode: ~s" mode))))
;; text : text%
@@ -59,6 +60,7 @@
(send text set-styles-sticky #f)
#;(send text hide-caret #t)
(send text lock #t)
+ (refresh)
(super-new)))
@@ -123,6 +125,10 @@
(class* object% ()
(init-field text)
+ ;; display-null-info : -> void
+ (define/public (display-null-info)
+ (display "No syntax selected\n" n/a-sd))
+
;; display-meaning-info : syntax -> void
(define/public (display-meaning-info stx)
(when (and (identifier? stx)