1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/tk/lib/tk/event.rb: remove $LOADED_FEATURES trick

* ext/tk/lib/tk.rb: ditto


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nagai 2004-11-12 05:09:37 +00:00
parent 9f3d5e7172
commit 47fa2caf2e
3 changed files with 18 additions and 14 deletions

View file

@ -1,3 +1,9 @@
Fri Nov 12 14:08:01 2004 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tk/lib/tk/event.rb: remove $LOADED_FEATURES trick
* ext/tk/lib/tk.rb: ditto
Thu Nov 11 17:58:19 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
* dir.c (rb_glob): should have called rb_glob_caller().

View file

@ -1060,10 +1060,9 @@ module TkCore
WIDGET_DESTROY_HOOK = '<WIDGET_DESTROY_HOOK>'
INTERP._invoke_without_enc('event', 'add',
"<#{WIDGET_DESTROY_HOOK}>", 'Destroy')
"<#{WIDGET_DESTROY_HOOK}>", '<Destroy>')
INTERP._invoke_without_enc('bind', 'all', "<#{WIDGET_DESTROY_HOOK}>",
install_bind(proc{|xpath|
path = xpath[1..-1]
install_cmd(proc{|path|
unless TkCore::INTERP.deleted?
if (widget = TkCore::INTERP.tk_windows[path])
if widget.respond_to?(:__destroy_hook__)
@ -1074,7 +1073,8 @@ module TkCore
end
end
end
}, 'x%W'))
}) << ' %W')
INTERP.add_tk_procs(TclTkLib::FINALIZE_PROC_NAME, '',
"bind all <#{WIDGET_DESTROY_HOOK}> {}")

View file

@ -2,16 +2,15 @@
# tk/event.rb - module for event
#
unless $LOADED_FEATURES.member?('tk.rb')
# change loading order
module TkEvent
end
$LOADED_FEATURES.delete('tk/event.rb')
########################
require 'tkutil'
require 'tk'
require 'tkutil'
require 'tk'
else
################################################
########################
module TkEvent
class Event < TkUtil::CallbackSubst
@ -133,6 +132,8 @@ module TkEvent
end
###############################################
def install_bind_for_event_class(klass, cmd, *args)
extra_args_tbl = klass._get_extra_args_tbl
@ -175,6 +176,3 @@ module TkEvent
install_bind_for_event_class(TkEvent::Event, cmd, *args)
end
end
################################################
end