summaryrefslogtreecommitdiff
path: root/ext/tk/lib
diff options
context:
space:
mode:
authornagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-09-09 05:03:21 +0000
committernagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-09-09 05:03:21 +0000
commita4273db675d141176e92dfbd67d5eef1da7c38e9 (patch)
tree360c54ac5323cb713a04e76f1b5b19b09e47f7c4 /ext/tk/lib
parentec44b345a550eee408dd2a1df66307ce1feb3261 (diff)
* ext/tcltklib/tcltklib.c (ip_init): change flag value for setting 'argv' and 'argv0' variable
* ext/tk/lib/remote-tk.rb: follow changes of multi-tk.rb git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/lib')
-rw-r--r--ext/tk/lib/remote-tk.rb29
1 files changed, 29 insertions, 0 deletions
diff --git a/ext/tk/lib/remote-tk.rb b/ext/tk/lib/remote-tk.rb
index bdee25e060..85888b158a 100644
--- a/ext/tk/lib/remote-tk.rb
+++ b/ext/tk/lib/remote-tk.rb
@@ -14,6 +14,17 @@ class MultiTkIp
@@TK_TABLE_LIST = [].taint unless defined?(@@TK_TABLE_LIST)
def self._IP_TABLE; @@IP_TABLE; end
def self._TK_TABLE_LIST; @@TK_TABLE_LIST; end
+
+ @flag = true
+ def self._DEFAULT_MASTER
+ # work only once
+ if @flag
+ @flag = nil
+ @@DEFAULT_MASTER
+ else
+ nil
+ end
+ end
end
class RemoteTkIp
@@IP_TABLE = MultiTkIp._IP_TABLE unless defined?(@@IP_TABLE)
@@ -26,6 +37,15 @@ end
require 'multi-tk'
+class RemoteTkIp
+ if defined?(@@DEFAULT_MASTER)
+ MultiTkIp._DEFAULT_MASTER
+ else
+ @@DEFAULT_MASTER = MultiTkIp._DEFAULT_MASTER
+ end
+end
+
+
###############################
class << RemoteTkIp
@@ -73,14 +93,19 @@ class RemoteTkIp
@threadgroup = ThreadGroup.new
+ @safe_level = [$SAFE]
+
@cmd_queue = Queue.new
+=begin
@cmd_receiver, @receiver_watchdog = _create_receiver_and_watchdog()
@threadgroup.add @cmd_receiver
@threadgroup.add @receiver_watchdog
@threadgroup.enclose
+=end
+ @@DEFAULT_MASTER.assign_receiver_and_watchdog(self)
@@IP_TABLE[@threadgroup] = self
@@TK_TABLE_LIST.size.times{
@@ -94,6 +119,10 @@ class RemoteTkIp
end
@ip_id = _create_connection
+ class << self
+ undef :instance_eval
+ end
+
self.freeze # defend against modification
end