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:
parent
9f3d5e7172
commit
47fa2caf2e
3 changed files with 18 additions and 14 deletions
|
@ -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>
|
Thu Nov 11 17:58:19 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* dir.c (rb_glob): should have called rb_glob_caller().
|
* dir.c (rb_glob): should have called rb_glob_caller().
|
||||||
|
|
|
@ -1060,10 +1060,9 @@ module TkCore
|
||||||
|
|
||||||
WIDGET_DESTROY_HOOK = '<WIDGET_DESTROY_HOOK>'
|
WIDGET_DESTROY_HOOK = '<WIDGET_DESTROY_HOOK>'
|
||||||
INTERP._invoke_without_enc('event', 'add',
|
INTERP._invoke_without_enc('event', 'add',
|
||||||
"<#{WIDGET_DESTROY_HOOK}>", 'Destroy')
|
"<#{WIDGET_DESTROY_HOOK}>", '<Destroy>')
|
||||||
INTERP._invoke_without_enc('bind', 'all', "<#{WIDGET_DESTROY_HOOK}>",
|
INTERP._invoke_without_enc('bind', 'all', "<#{WIDGET_DESTROY_HOOK}>",
|
||||||
install_bind(proc{|xpath|
|
install_cmd(proc{|path|
|
||||||
path = xpath[1..-1]
|
|
||||||
unless TkCore::INTERP.deleted?
|
unless TkCore::INTERP.deleted?
|
||||||
if (widget = TkCore::INTERP.tk_windows[path])
|
if (widget = TkCore::INTERP.tk_windows[path])
|
||||||
if widget.respond_to?(:__destroy_hook__)
|
if widget.respond_to?(:__destroy_hook__)
|
||||||
|
@ -1074,7 +1073,8 @@ module TkCore
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
}, 'x%W'))
|
}) << ' %W')
|
||||||
|
|
||||||
INTERP.add_tk_procs(TclTkLib::FINALIZE_PROC_NAME, '',
|
INTERP.add_tk_procs(TclTkLib::FINALIZE_PROC_NAME, '',
|
||||||
"bind all <#{WIDGET_DESTROY_HOOK}> {}")
|
"bind all <#{WIDGET_DESTROY_HOOK}> {}")
|
||||||
|
|
||||||
|
|
|
@ -2,16 +2,15 @@
|
||||||
# tk/event.rb - module for event
|
# tk/event.rb - module for event
|
||||||
#
|
#
|
||||||
|
|
||||||
unless $LOADED_FEATURES.member?('tk.rb')
|
module TkEvent
|
||||||
# change loading order
|
end
|
||||||
|
|
||||||
$LOADED_FEATURES.delete('tk/event.rb')
|
########################
|
||||||
|
|
||||||
require 'tkutil'
|
require 'tkutil'
|
||||||
require 'tk'
|
require 'tk'
|
||||||
|
|
||||||
else
|
########################
|
||||||
################################################
|
|
||||||
|
|
||||||
module TkEvent
|
module TkEvent
|
||||||
class Event < TkUtil::CallbackSubst
|
class Event < TkUtil::CallbackSubst
|
||||||
|
@ -133,6 +132,8 @@ module TkEvent
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
###############################################
|
||||||
|
|
||||||
def install_bind_for_event_class(klass, cmd, *args)
|
def install_bind_for_event_class(klass, cmd, *args)
|
||||||
extra_args_tbl = klass._get_extra_args_tbl
|
extra_args_tbl = klass._get_extra_args_tbl
|
||||||
|
|
||||||
|
@ -175,6 +176,3 @@ module TkEvent
|
||||||
install_bind_for_event_class(TkEvent::Event, cmd, *args)
|
install_bind_for_event_class(TkEvent::Event, cmd, *args)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
################################################
|
|
||||||
end
|
|
||||||
|
|
Loading…
Reference in a new issue