Gauche > Archives > 2021/07/16

2021/07/16 14:37:36 UTCokadan
#
Windows10 上で Gauche-tk を動かしてみました。
#
一応動いたのですが。
#
gosh> (use tk)
gosh> (wish-path "C:/Program Files/Git/mingw64/bin/wish.exe")
#f
gosh> (wish-path "C:/Program Files/Git/mingw64/bin/wish.exe")
"C:/Program Files/Git/mingw64/bin/wish.exe"
gosh>
(with-module tk (set! *tk-debug* #t))
#t
gosh> (tk-init '())
#t
gosh> (tk-button '.b :text "Click me" :command (^[] (print "Yeah!")))
> gauche__tk__do button .b -text "Click me" -command "gauche__tk__callback 1 "
< ok
.b
".b"
gosh> (tk-pack '.b)
> gauche__tk__do pack .b
< ok

""
gosh> (tk-mainloop)
! 1
Yeah!
! 1
Yeah!
! 1
Yeah!
#
こんな感じで (wish-path の行が2行必要でした。
#
また、tk.scm を1行書き換えないと動きませんでした。
#
;(define-method encode ((x <keyword>)) #`"-,x") ;; :foo => -foo
(define-method encode ((x <keyword>)) #`"-,(keyword->string x)") ;; :foo => -foo
#
この部分です。
#
もしかして私が何か勘違いしていますでしょうか?
#
ご教授頂けると助かります。
#
よろしくお願いいたします。
2021/07/16 20:48:06 UTCshiro
#
あ、keyword->stringのところはシンボルとキーワードの統合により変わったところですね。修正しておきます。
#
wish-pathは、「ひとつ前の値
#
」を返すので、1回やるだけで動くと思いますがどうですか?
2021/07/16 22:11:36 UTCokadan
#
あ、本当ですね。
#
wish-path の件は、早とちりしました。
#
了解です。
#
ありがとうございます。