Fluent Scheme 之对话框

Fluent Scheme 提供了 cx-error-dialog 和 cx-file-dialog 等对话框操作。cx-error-dialog 用于显示错误信息并中断执行,尤其在 GUI 环境下会弹出错误对话框。cx-file-dialog 则让用户选择文件路径,接受两个回调函数,一个在选择后执行,另一个作用未明确。选择的路径会被存储在一个字符串变量 v 中。
摘要由CSDN通过智能技术生成

Fluent Scheme 中提供了一些对话框相关的 procedure,包括

;; (cx-error-dialog msg)
;; 
;; (cx-file-dialog pattern filter default apply-cb unknown-cb)
;;
;; cx-dialog-done
;; cx-multiple-file-dialog
;; cx-select-dialog
;; cx-prompt-dialog
;; cx-working-dialog
;; cx-yes-no-dialog
;; cx-ok-cancel-dialog
;; cx-info-dialog
;; cx-warning-dialog
;; append-file-dialog
;; write-file-dialog

已经知道或部分解析到用法的有 cx-error-dialog 和 cx-file-dialog。


cx-error-dialog 主要用于显示错误信息,中断 scheme 代码的执行,例如


(if (> i MAX)
  (cx-error-dialog "Exceed the maximum value.")
)

显示效果的话,在命令中执行显示错误提示信息,在 GUI 中调用的话还会弹出错误对话框。


Error: Specified wrong coordinates
Error Object: #f

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值