summaryrefslogtreecommitdiffstats
path: root/ext/tk/lib
diff options
context:
space:
mode:
authornagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-03-30 08:44:19 +0000
committernagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-03-30 08:44:19 +0000
commitbbcbe0b7e5d5969d6a55cc885a323107e415ce44 (patch)
tree760e0cf10c7c7083f6f784f16b602dd562214dd6 /ext/tk/lib
parent2f50816ad9df366072d9a72a590180b2a78d07c2 (diff)
downloadruby-bbcbe0b7e5d5969d6a55cc885a323107e415ce44.tar.gz
ruby-bbcbe0b7e5d5969d6a55cc885a323107e415ce44.tar.xz
ruby-bbcbe0b7e5d5969d6a55cc885a323107e415ce44.zip
* ext/tk/tcltklib.c: add TclTkIp#_create_console() method to create
a Tcl/Tk's console window. * ext/tk/lib/multi-tk.rb: support TclTkIp#_create_console() method. * ext/tk/lib/remote-tk.rb: ditto. * ext/tk/lib/tk/console.rb: ditto. * ext/tk/lib/tk.rb: update RELEASE_DATE * ext/tk/sample/demo-*/check2.rb: use 'return' in the Proc object. * ext/tk/sample/tkextlib/**: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/lib')
-rw-r--r--ext/tk/lib/multi-tk.rb4
-rw-r--r--ext/tk/lib/remote-tk.rb4
-rw-r--r--ext/tk/lib/tk.rb2
-rw-r--r--ext/tk/lib/tk/console.rb3
4 files changed, 12 insertions, 1 deletions
diff --git a/ext/tk/lib/multi-tk.rb b/ext/tk/lib/multi-tk.rb
index a38f079ad..49427575d 100644
--- a/ext/tk/lib/multi-tk.rb
+++ b/ext/tk/lib/multi-tk.rb
@@ -1787,6 +1787,10 @@ class << MultiTkIp
def _conv_listelement(arg)
__getip._conv_listelement(arg)
end
+
+ def _create_console
+ __getip._create_console
+ end
end
diff --git a/ext/tk/lib/remote-tk.rb b/ext/tk/lib/remote-tk.rb
index 04d86d4cd..03b6a45e5 100644
--- a/ext/tk/lib/remote-tk.rb
+++ b/ext/tk/lib/remote-tk.rb
@@ -400,6 +400,10 @@ class RemoteTkIp
@interp._conv_listelement(str)
end
+ def _create_console
+ fail RuntimeError, 'not support "_create_console" on the remote interpreter'
+ end
+
def mainloop
fail RuntimeError, 'not support "mainloop" on the remote interpreter'
end
diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb
index 61e76c29b..1997bba9c 100644
--- a/ext/tk/lib/tk.rb
+++ b/ext/tk/lib/tk.rb
@@ -4024,7 +4024,7 @@ end
#Tk.freeze
module Tk
- RELEASE_DATE = '2005-03-26'.freeze
+ RELEASE_DATE = '2005-03-30'.freeze
autoload :AUTO_PATH, 'tk/variable'
autoload :TCL_PACKAGE_PATH, 'tk/variable'
diff --git a/ext/tk/lib/tk/console.rb b/ext/tk/lib/tk/console.rb
index f0d2c7aa8..1a267b717 100644
--- a/ext/tk/lib/tk/console.rb
+++ b/ext/tk/lib/tk/console.rb
@@ -9,6 +9,9 @@ module TkConsole
TkCommandNames = ['console'.freeze].freeze
+ def self.create
+ TkCore::INTERP._create_console
+ end
def self.title(str=None)
tk_call 'console', str
end