Now accepts "/quit" to quit instead of "quit"
This commit is contained in:
parent
183fad9de3
commit
6bac96cfdb
@ -65,7 +65,7 @@
|
||||
; TODO make label setable
|
||||
(define input (new text-field%
|
||||
[parent main-frame]
|
||||
[label "Username:"]
|
||||
[label "user"]
|
||||
[callback text-field-callback]
|
||||
))
|
||||
|
||||
@ -194,10 +194,13 @@
|
||||
|
||||
;; prompt user for username
|
||||
;; could randomly assign a user
|
||||
;; after calling get-text set it as new label of text-field
|
||||
(define (get-username)
|
||||
(get-text-from-user "Username set-up" "Please enter a username"
|
||||
(define returned (get-text-from-user "Username set-up" "Please enter a username"
|
||||
main-frame "user" (list 'disallow-invalid)
|
||||
#:validate string? ))
|
||||
(send input set-label returned)
|
||||
returned)
|
||||
|
||||
;;dispatch goes below that
|
||||
;; TODO get username function maybe
|
||||
|
@ -99,7 +99,7 @@
|
||||
; TODO prompt for color as well
|
||||
|
||||
; TODO /quit instead of quit
|
||||
(cond ((string=? input "quit")
|
||||
(cond ((string=? input "/quit")
|
||||
(displayln (string-append date-print username " signing out. See ya!") out)
|
||||
(flush-output out)
|
||||
(close-output-port error-out)
|
||||
|
Loading…
Reference in New Issue
Block a user