working on getting modules to work

updated demos with new func names
temporarily modified debugger-model.ss

svn: r109
This commit is contained in:
Jono Spiro 2004-07-23 20:08:43 +00:00
parent c34db4aefd
commit 64fd726a02
2 changed files with 5 additions and 53 deletions

View File

@ -14,9 +14,7 @@
(import drscheme:tool^)
(define (phase1) (void))
(define (phase2)
(print ((drscheme:language:get-default-mixin)) #;(drscheme:language:get-language-extensions)
#;(preferences:get (drscheme:language-configuration:get-settings-preferences-symbol))))
(define (phase2) (void))
(define debugger-bitmap
(drscheme:unit:make-bitmap
@ -38,50 +36,11 @@
(let* ([pos (send (get-definitions-text) get-start-position)]
[line (send (get-definitions-text) position-paragraph pos)]
[column (- pos (send (get-definitions-text) line-start-position
(send (get-definitions-text) position-line pos)))])
(send (get-definitions-text) position-line pos)))])
(message-box "Syntax Offset"
(format "Line: ~a~nColumn: ~a~nOffset: ~a" (add1 line) column pos))))))
(define test-button
(make-object button%
"test-me"
(get-button-panel)
(lambda (button evt)
((lambda (iter)
(let* ([lang-settings
(preferences:get
(drscheme:language-configuration:get-settings-preferences-symbol))]
[lang (drscheme:language-configuration:language-settings-language lang-settings)]
[settings (drscheme:language-configuration:language-settings-settings lang-settings)])
(drscheme:eval:expand-program
(drscheme:language:make-text/pos (get-definitions-text)
0
(send (get-definitions-text) last-position))
lang-settings
#f
(lambda ()
;TODO error handler for exceptions
(error-value->string-handler
(lambda (val len)
(let ([sp (open-output-string)])
(send lang render-value val settings sp #f)
(let ([str (get-output-string sp)])
(if ((string-length str) . <= . len)
str
(string-append (substring str 0 (max 0 (- len 3))) "..."))))))
(drscheme:teachpack:install-teachpacks
(preferences:get 'drscheme:teachpacks)))
void ; kill
iter)))
(lambda (stx thunk)
(unless (eof-object? stx)
(eval stx)
(printf ">> ~a~n~n" (syntax-object->datum stx))
(thunk)))))))
(format "Line: ~a~nColumn: ~a~nOffset: ~a" (add1 line) column pos))))))
(send (get-button-panel) change-children
(lambda (_) (cons test-button (remq test-button
(cons debugger-button (remq debugger-button _))))))))
(lambda (_) (cons debugger-button (remq debugger-button _))))))
(drscheme:get/extend:extend-unit-frame debugger-unit-frame-mixin))))
(drscheme:get/extend:extend-unit-frame debugger-unit-frame-mixin))))

View File

@ -16,9 +16,6 @@ rethink start/resume and kill -- do we want people to be able to restart after a
RETHROW EXCEPTIONS CAUGHT ON THE STREAM FOR A CLIENT -- OFFER A WAY TO DISABLE IT
WHO is catching (thread (lambda () (raise 'first-raise)))? It never gets to the exn evstream
Need a way to define which language to evaluate the target with. Robby should know how: robby@cs.uchicago.edu
Does this work with modules? with frtime?
You cannot annotate across requires. Test threads and multiple clients. Two files at the same time if they use each other?
DrScheme has hooks which should let me bind to the 'load's of libraries and force loading source, then annotating after expansion.
@ -346,10 +343,6 @@ Find a way to bind to the result of ananonymous expression: here->(add1 2)
;#################### SCRIPT FUNCTIONS ###################
;dont forget to contract this
;(define (send-to-eval client stx)
; (parameterize ))
; Switches the running state on or off
; (client [boolean]) -> ()