fixed a bug on jump-to feature + errors
svn: r15484
This commit is contained in:
parent
26a94ad11c
commit
3dab936d0f
|
@ -7,7 +7,7 @@
|
||||||
string-constants
|
string-constants
|
||||||
(prefix-in frame: framework)
|
(prefix-in frame: framework)
|
||||||
mrlib/switchable-button
|
mrlib/switchable-button
|
||||||
"private/my-macros.ss"
|
(file "private/my-macros.ss")
|
||||||
(prefix-in x: "private/mred-extensions.ss")
|
(prefix-in x: "private/mred-extensions.ss")
|
||||||
"private/shared.ss"
|
"private/shared.ss"
|
||||||
lang/stepper-language-interface
|
lang/stepper-language-interface
|
||||||
|
|
|
@ -98,7 +98,7 @@
|
||||||
(update-view/existing (- (length view-history) 1)))]
|
(update-view/existing (- (length view-history) 1)))]
|
||||||
[else
|
[else
|
||||||
;; nope, keep running:
|
;; nope, keep running:
|
||||||
(begin (if (eq? (step-kind new-step) 'finished-stepping)
|
(begin (if (finished-stepping-step? new-step)
|
||||||
(begin (message-box "Ran out of steps"
|
(begin (message-box "Ran out of steps"
|
||||||
"Reached the end of evaluation before finding the kind of step you were looking for.")
|
"Reached the end of evaluation before finding the kind of step you were looking for.")
|
||||||
(update-view/existing (- (length view-history) 1)))
|
(update-view/existing (- (length view-history) 1)))
|
||||||
|
@ -158,13 +158,13 @@
|
||||||
;; is this an application step?
|
;; is this an application step?
|
||||||
(define (application-step? history-entry)
|
(define (application-step? history-entry)
|
||||||
(match history-entry
|
(match history-entry
|
||||||
[(struct step (text (or 'user-application 'finished-stepping) posns)) #t]
|
[(struct step (text (or 'user-application 'finished-or-error) posns)) #t]
|
||||||
[else #f]))
|
[else #f]))
|
||||||
|
|
||||||
;; is this the finished-stepping step?
|
;; is this the finished-stepping step?
|
||||||
(define (finished-stepping-step? history-entry)
|
(define (finished-stepping-step? history-entry)
|
||||||
(match (step-kind history-entry)
|
(match (step-kind history-entry)
|
||||||
['finished-stepping #t]
|
['finished-or-error #t]
|
||||||
[else #f]))
|
[else #f]))
|
||||||
|
|
||||||
;; is this step on the selected expression?
|
;; is this step on the selected expression?
|
||||||
|
@ -350,11 +350,11 @@
|
||||||
[(struct before-after-result (pre-exps post-exps kind pre-src post-src))
|
[(struct before-after-result (pre-exps post-exps kind pre-src post-src))
|
||||||
(list (new x:stepper-text% [left-side pre-exps] [right-side post-exps]) kind (list pre-src post-src))]
|
(list (new x:stepper-text% [left-side pre-exps] [right-side post-exps]) kind (list pre-src post-src))]
|
||||||
[(struct before-error-result (pre-exps err-msg pre-src))
|
[(struct before-error-result (pre-exps err-msg pre-src))
|
||||||
(list (new x:stepper-text% [left-side pre-exps] [right-side err-msg]) #f (list pre-src))]
|
(list (new x:stepper-text% [left-side pre-exps] [right-side err-msg]) 'finished-or-error (list pre-src))]
|
||||||
[(struct error-result (err-msg))
|
[(struct error-result (err-msg))
|
||||||
(list (new x:stepper-text% [left-side null] [right-side err-msg]) #f (list))]
|
(list (new x:stepper-text% [left-side null] [right-side err-msg]) 'finished-or-error (list))]
|
||||||
[(struct finished-stepping ())
|
[(struct finished-stepping ())
|
||||||
(list x:finished-text 'finished-stepping (list))])])
|
(list x:finished-text 'finished-or-error (list))])])
|
||||||
(hand-off-and-block step-text step-kind posns)))
|
(hand-off-and-block step-text step-kind posns)))
|
||||||
|
|
||||||
;; program-expander-prime : wrap the program-expander for a couple of reasons:
|
;; program-expander-prime : wrap the program-expander for a couple of reasons:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user