我正在运行以下代码:
(define myframe (new frame% [label "myframe"]))
(define tf1 (new text-field% [parent myframe] [label "tf1"]))
(define tf2 (new text-field% [parent myframe][label "tf2"]))
(define tf3 (new text-field% [parent myframe][label "tf3"]))
(send myframe show #t)
(define combined_str (string-append (send tf1 get-value) "-" (send tf2 get-value) "-" (send tf3 get-value) ))
(println combined_str)
(if (eq? "--" combined_str) "same" "different")
输出是:
"--"
"different"
combined_str是" - "因为文本字段是空白的。但它并不像" - "。
那样