From bbcbe0b7e5d5969d6a55cc885a323107e415ce44 Mon Sep 17 00:00:00 2001 From: nagai Date: Wed, 30 Mar 2005 08:44:19 +0000 Subject: * 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 --- ext/tk/lib/multi-tk.rb | 4 ++++ ext/tk/lib/remote-tk.rb | 4 ++++ ext/tk/lib/tk.rb | 2 +- ext/tk/lib/tk/console.rb | 3 +++ 4 files changed, 12 insertions(+), 1 deletion(-) (limited to 'ext/tk/lib') 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 -- cgit