diff options
author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-12-06 16:05:50 +0000 |
---|---|---|
committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-12-06 16:05:50 +0000 |
commit | 9671b1da830e2f20ef3c7cc59a62a99cd0cf3260 (patch) | |
tree | f8dd1faf0b030cb6ab7c5b8040fb6cbfb6d368b9 /ext/tk/README.macosx-aqua | |
parent | 6a7f9daf4bdab174e7173f5d973cfe76d081748d (diff) | |
download | ruby-9671b1da830e2f20ef3c7cc59a62a99cd0cf3260.tar.gz ruby-9671b1da830e2f20ef3c7cc59a62a99cd0cf3260.tar.xz ruby-9671b1da830e2f20ef3c7cc59a62a99cd0cf3260.zip |
* ext/tk/README.macosx-aqua: [new document] tips to avoid the known
bug on platform specific dialogs of Tcl/Tk Aqua on MacOS X.
* ext/tk/tcltklib.c: fix bug on switching threads and waiting on the
deleted interpreter on vwait and tkwait command.
* ext/tk/lib/multi-tk.rb: kill the meaningless loop for the deleted Tk
interpreter.
* ext/tk/sample/demos-jp/image3.rb: [bug fix] wrong argument.
* ext/tk/sample/demos-en/image3.rb: ditto.
* ext/tk/sample/demos-jp/menu.rb: fix message for MacOS X.
* ext/tk/sample/demos-jp/menu8x.rb: ditto.
* ext/tk/sample/demos-en/menu.rb: ditto.
* ext/tk/sample/demos-jp/widget; update version-info.
* ext/tk/sample/demos-en/widget; ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/README.macosx-aqua')
-rw-r--r-- | ext/tk/README.macosx-aqua | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/ext/tk/README.macosx-aqua b/ext/tk/README.macosx-aqua new file mode 100644 index 000000000..25a8ed827 --- /dev/null +++ b/ext/tk/README.macosx-aqua @@ -0,0 +1,67 @@ + + *** for MacOS X Aqua (Tcl/Tk Aqua) users *** + +First of all, please read README.tcltklib to use Tcl/Tk Aqua Framework. + +With Tcl/Tk Aqua libraries, current tcltklib somtimes freezes when +using Aqua specific dialogs (e.g. Tk.messageBox). +This is a known bug of Ruby-1.8.4 release. + +When you meet the trouble on your GUI, you'll be able to avoid the trouble +by Tcl/Tk's traditional dialogs. +If you want to do that, please call some of the following bits of script +after "reqruie 'tk'". + +================================================================= +# use a traditional dialog for Tk.chooseColor() +Tk.ip_eval(<<'EOS') + proc ::tk_chooseColor {args} { + return [eval tk::dialog::color:: $args] + } +EOS + +# use a traditional dialog for Tk.getOpenFile() and Tk.getMultipleOpenFile() +Tk.ip_eval(<<'EOS') + proc ::tk_getOpenFile {args} { + if {$::tk_strictMotif} { + return [eval tk::MotifFDialog open $args] + } else { + return [eval ::tk::dialog::file:: open $args] + } + } +EOS + +# use a traditional dialog for Tk.getSaveFile() and Tk.getMultipleSaveFile() +Tk.ip_eval(<<'EOS') + proc ::tk_getSaveFile {args} { + if {$::tk_strictMotif} { + return [eval tk::MotifFDialog save $args] + } else { + return [eval ::tk::dialog::file:: save $args] + } + } +EOS + +# use a traditional dialog for Tk.messageBox() +Tk.ip_eval(<<'EOS') + proc ::tk_messageBox {args} { + return [eval tk::MessageBox $args] + } +EOS + +# use a traditional dialog for Tk.chooseDirectory() +Tk.ip_eval(<<'EOS') + proc ::tk_chooseDirectory {args} { + return [eval ::tk::dialog::file::chooseDir:: $args] + } +EOS +================================================================= + +Each of them replaces the platform specific dialog command to the +traditional one. + +If you use some MultiTkIp objects, probably, you'll have to call the +bits of script for each MultiTkIp object. + +-- +Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) |