original commit: ad1b5fd375b0df06d58375f26b44b1eb0b755dac
This commit is contained in:
Robby Findler 1999-02-15 22:18:00 +00:00
parent 71a0132b23
commit 619a4e70e3
5 changed files with 24 additions and 15 deletions

View File

@ -450,13 +450,12 @@
[bottom-panel (make-object horizontal-panel% main-panel)]
[directory-field
(make-object text-field%
"Full pathname"
directory-panel
(lambda (evt txt)
(when (eq? (send evt get-type) 'text-enter)
(lambda (txt evt)
(when (eq? (send evt get-event-type) 'text-field-enter)
(do-ok))))]
[result-list

View File

@ -105,7 +105,9 @@
(send (get-editor) on-close))]
[get-area-container% (lambda () panel:vertical-editor%)])
(private
[label file-name]
[label (let-values ([(base name dir?) (split-path file-name)])
(or name
file-name))]
[label-prefix (application:current-app-name)]
[do-label
(lambda ()

View File

@ -87,7 +87,7 @@
(opt-lambda (filename
[make-default
(lambda ()
(make-object frame:text-info-file% filename))])
(send (make-object frame:text-info-file% filename) show #t))])
(gui-utils:show-busy-cursor
(lambda ()
(if filename

View File

@ -89,11 +89,9 @@
tmp-file-name)])
(test
name
(lambda (x)
(delete-file tmp-file)
(equal? x test-file-contents))
(lambda ()
(send-sexp-to-mred
`(begin
@ -103,20 +101,31 @@
(send-sexp-to-mred
`(test:menu-select "File" "Open..."))
(wait-for-frame "Get file")
(call-with-output-file tmp-file-name
(call-with-output-file tmp-file
(lambda (port)
(display test-file-contents port))
'truncate)
(send-sexp-to-mred
`(begin (send (find-labelled-window "Full pathname") focus)
,(case (system-type)
[(macos unix) `(test:keystroke #\a '(meta))]
[(windows) `(test:keystroke #\a '(control))]
[else (error "unknown system type")])
(for-each test:keystroke
(string->list ,tmp-file))
(test:keystroke #\return)))
(wait-for-frame (format "framework - ~a" tmp-file-name))
(send-sexp-to-mred
`(let* ([w (get-top-level-focus-window)]
[t (send (send w get-editor) get-text)])
(test:close-window w)
t))))))
(wait-for-frame tmp-file-name)
(begin0
(send-sexp-to-mred
`(let* ([w (get-top-level-focus-window)]
[t (send (send w get-editor) get-text)])
(test:close-top-level-window w)
t))
(wait-for-frame "test open")
(send-sexp-to-mred
`(test:close-top-level-window (get-top-level-focus-window))))))))
(test-open "frame:editor open" 'frame:text%)
(test-open "frame:editor open" 'frame:searchable%)
(test-open "frame:editor open" 'frame:text-info%)
(test-open "frame:editor open" 'frame:text-info-file%)

View File

@ -207,7 +207,6 @@
(define (wait-for-frame name)
(wait-for `(let ([win (get-top-level-focus-window)])
(printf "name: ~a~n" (and win (box (send win get-label))))
(and win (string=? (send win get-label) ,name)))))))
(define Engine