问题描述
我使用typed / racket / gui软件包来构建应用程序。我需要关闭默认情况下已激活的粘贴板%的选择框。通常,您可以使用方法set-area-selectable来执行此操作,但是由于出现此错误,它在某种程度上对我不起作用:
Type Checker: send: method not understood by object
method name: set-area-selectable
object type: (Instance Pasteboard%)
in: (send this set-area-selectable #f)
location...:
这是我的代码:
(define-type Graph-Pasteboard%
(Class #:implements/inits Pasteboard%)
)
(: graph-pasteboard% : Graph-Pasteboard%)
(define graph-pasteboard%
(class pasteboard%
(super-new)
(: do-paste (Integer -> Void))
(define/override (do-paste time) (void))
(send this set-area-selectable #f)
))
对此的一种解决方案是重写方法on-default-event,但这将意味着很多不必要的工作。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)