From 39457234647d6f8a9f41839aacbe26fb2ff75c70 Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Tue, 23 Jan 2024 17:01:29 -0800 Subject: [PATCH] Avoid circular require warnings for require 'tk' --- lib/multi-tk.rb | 2 +- lib/thread_tk.rb | 2 +- lib/tk/bgerror.rb | 2 +- lib/tk/bindtag.rb | 2 +- lib/tk/busy.rb | 2 +- lib/tk/button.rb | 2 +- lib/tk/canvas.rb | 2 +- lib/tk/canvastag.rb | 2 +- lib/tk/checkbutton.rb | 2 +- lib/tk/clipboard.rb | 2 +- lib/tk/clock.rb | 2 +- lib/tk/composite.rb | 2 +- lib/tk/console.rb | 2 +- lib/tk/dialog.rb | 2 +- lib/tk/encodedstr.rb | 2 +- lib/tk/entry.rb | 2 +- lib/tk/font.rb | 2 +- lib/tk/fontchooser.rb | 2 +- lib/tk/frame.rb | 2 +- lib/tk/grid.rb | 2 +- lib/tk/image.rb | 2 +- lib/tk/itemconfig.rb | 2 +- lib/tk/itemfont.rb | 2 +- lib/tk/kinput.rb | 2 +- lib/tk/label.rb | 2 +- lib/tk/labelframe.rb | 2 +- lib/tk/listbox.rb | 2 +- lib/tk/macpkg.rb | 2 +- lib/tk/menu.rb | 2 +- lib/tk/menubar.rb | 2 +- lib/tk/message.rb | 2 +- lib/tk/mngfocus.rb | 2 +- lib/tk/msgcat.rb | 2 +- lib/tk/namespace.rb | 2 +- lib/tk/optiondb.rb | 2 +- lib/tk/optionobj.rb | 2 +- lib/tk/pack.rb | 2 +- lib/tk/package.rb | 2 +- lib/tk/palette.rb | 2 +- lib/tk/panedwindow.rb | 2 +- lib/tk/place.rb | 2 +- lib/tk/radiobutton.rb | 2 +- lib/tk/root.rb | 2 +- lib/tk/scale.rb | 2 +- lib/tk/scrollable.rb | 2 +- lib/tk/scrollbar.rb | 2 +- lib/tk/scrollbox.rb | 2 +- lib/tk/selection.rb | 2 +- lib/tk/spinbox.rb | 2 +- lib/tk/tagfont.rb | 2 +- lib/tk/text.rb | 2 +- lib/tk/textimage.rb | 2 +- lib/tk/textmark.rb | 2 +- lib/tk/texttag.rb | 2 +- lib/tk/textwindow.rb | 2 +- lib/tk/timer.rb | 2 +- lib/tk/tk_mac.rb | 2 +- lib/tk/toplevel.rb | 2 +- lib/tk/txtwin_abst.rb | 2 +- lib/tk/validation.rb | 2 +- lib/tk/variable.rb | 2 +- lib/tk/virtevent.rb | 2 +- lib/tk/winfo.rb | 2 +- lib/tk/winpkg.rb | 2 +- lib/tk/wm.rb | 2 +- lib/tk/xim.rb | 2 +- lib/tkextlib/ICONS/icons.rb | 2 +- lib/tkextlib/blt.rb | 2 +- lib/tkextlib/blt/barchart.rb | 2 +- lib/tkextlib/blt/bitmap.rb | 2 +- lib/tkextlib/blt/busy.rb | 2 +- lib/tkextlib/blt/component.rb | 2 +- lib/tkextlib/blt/container.rb | 2 +- lib/tkextlib/blt/cutbuffer.rb | 2 +- lib/tkextlib/blt/dragdrop.rb | 2 +- lib/tkextlib/blt/eps.rb | 2 +- lib/tkextlib/blt/graph.rb | 2 +- lib/tkextlib/blt/htext.rb | 2 +- lib/tkextlib/blt/spline.rb | 2 +- lib/tkextlib/blt/stripchart.rb | 2 +- lib/tkextlib/blt/table.rb | 2 +- lib/tkextlib/blt/tabnotebook.rb | 2 +- lib/tkextlib/blt/tabset.rb | 2 +- lib/tkextlib/blt/ted.rb | 2 +- lib/tkextlib/blt/tile.rb | 2 +- lib/tkextlib/blt/tile/button.rb | 2 +- lib/tkextlib/blt/tile/checkbutton.rb | 2 +- lib/tkextlib/blt/tile/frame.rb | 2 +- lib/tkextlib/blt/tile/label.rb | 2 +- lib/tkextlib/blt/tile/radiobutton.rb | 2 +- lib/tkextlib/blt/tile/scrollbar.rb | 2 +- lib/tkextlib/blt/tile/toplevel.rb | 2 +- lib/tkextlib/blt/tree.rb | 2 +- lib/tkextlib/blt/treeview.rb | 2 +- lib/tkextlib/blt/unix_dnd.rb | 2 +- lib/tkextlib/blt/vector.rb | 2 +- lib/tkextlib/blt/watch.rb | 2 +- lib/tkextlib/blt/win_printer.rb | 2 +- lib/tkextlib/blt/winop.rb | 2 +- lib/tkextlib/bwidget.rb | 2 +- lib/tkextlib/bwidget/arrowbutton.rb | 2 +- lib/tkextlib/bwidget/bitmap.rb | 2 +- lib/tkextlib/bwidget/button.rb | 2 +- lib/tkextlib/bwidget/buttonbox.rb | 2 +- lib/tkextlib/bwidget/combobox.rb | 2 +- lib/tkextlib/bwidget/dialog.rb | 2 +- lib/tkextlib/bwidget/dragsite.rb | 2 +- lib/tkextlib/bwidget/dropsite.rb | 2 +- lib/tkextlib/bwidget/dynamichelp.rb | 2 +- lib/tkextlib/bwidget/entry.rb | 2 +- lib/tkextlib/bwidget/label.rb | 2 +- lib/tkextlib/bwidget/labelentry.rb | 2 +- lib/tkextlib/bwidget/labelframe.rb | 2 +- lib/tkextlib/bwidget/listbox.rb | 2 +- lib/tkextlib/bwidget/mainframe.rb | 2 +- lib/tkextlib/bwidget/messagedlg.rb | 2 +- lib/tkextlib/bwidget/notebook.rb | 2 +- lib/tkextlib/bwidget/pagesmanager.rb | 2 +- lib/tkextlib/bwidget/panedwindow.rb | 2 +- lib/tkextlib/bwidget/panelframe.rb | 2 +- lib/tkextlib/bwidget/passwddlg.rb | 2 +- lib/tkextlib/bwidget/progressbar.rb | 2 +- lib/tkextlib/bwidget/progressdlg.rb | 2 +- lib/tkextlib/bwidget/scrollableframe.rb | 2 +- lib/tkextlib/bwidget/scrolledwindow.rb | 2 +- lib/tkextlib/bwidget/scrollview.rb | 2 +- lib/tkextlib/bwidget/selectcolor.rb | 2 +- lib/tkextlib/bwidget/selectfont.rb | 2 +- lib/tkextlib/bwidget/separator.rb | 2 +- lib/tkextlib/bwidget/spinbox.rb | 2 +- lib/tkextlib/bwidget/statusbar.rb | 2 +- lib/tkextlib/bwidget/titleframe.rb | 2 +- lib/tkextlib/bwidget/tree.rb | 2 +- lib/tkextlib/bwidget/widget.rb | 2 +- lib/tkextlib/itcl/incr_tcl.rb | 2 +- lib/tkextlib/itk/incr_tk.rb | 2 +- lib/tkextlib/iwidgets.rb | 2 +- lib/tkextlib/iwidgets/buttonbox.rb | 2 +- lib/tkextlib/iwidgets/calendar.rb | 2 +- lib/tkextlib/iwidgets/canvasprintbox.rb | 2 +- lib/tkextlib/iwidgets/canvasprintdialog.rb | 2 +- lib/tkextlib/iwidgets/checkbox.rb | 2 +- lib/tkextlib/iwidgets/combobox.rb | 2 +- lib/tkextlib/iwidgets/dateentry.rb | 2 +- lib/tkextlib/iwidgets/datefield.rb | 2 +- lib/tkextlib/iwidgets/dialog.rb | 2 +- lib/tkextlib/iwidgets/dialogshell.rb | 2 +- lib/tkextlib/iwidgets/disjointlistbox.rb | 2 +- lib/tkextlib/iwidgets/entryfield.rb | 2 +- lib/tkextlib/iwidgets/extbutton.rb | 2 +- lib/tkextlib/iwidgets/extfileselectionbox.rb | 2 +- lib/tkextlib/iwidgets/extfileselectiondialog.rb | 2 +- lib/tkextlib/iwidgets/feedback.rb | 2 +- lib/tkextlib/iwidgets/fileselectionbox.rb | 2 +- lib/tkextlib/iwidgets/fileselectiondialog.rb | 2 +- lib/tkextlib/iwidgets/finddialog.rb | 2 +- lib/tkextlib/iwidgets/hierarchy.rb | 2 +- lib/tkextlib/iwidgets/hyperhelp.rb | 2 +- lib/tkextlib/iwidgets/labeledframe.rb | 2 +- lib/tkextlib/iwidgets/labeledwidget.rb | 2 +- lib/tkextlib/iwidgets/mainwindow.rb | 2 +- lib/tkextlib/iwidgets/menubar.rb | 2 +- lib/tkextlib/iwidgets/messagebox.rb | 2 +- lib/tkextlib/iwidgets/messagedialog.rb | 2 +- lib/tkextlib/iwidgets/notebook.rb | 2 +- lib/tkextlib/iwidgets/optionmenu.rb | 2 +- lib/tkextlib/iwidgets/panedwindow.rb | 2 +- lib/tkextlib/iwidgets/promptdialog.rb | 2 +- lib/tkextlib/iwidgets/pushbutton.rb | 2 +- lib/tkextlib/iwidgets/radiobox.rb | 2 +- lib/tkextlib/iwidgets/scopedobject.rb | 2 +- lib/tkextlib/iwidgets/scrolledcanvas.rb | 2 +- lib/tkextlib/iwidgets/scrolledframe.rb | 2 +- lib/tkextlib/iwidgets/scrolledhtml.rb | 2 +- lib/tkextlib/iwidgets/scrolledlistbox.rb | 2 +- lib/tkextlib/iwidgets/scrolledtext.rb | 2 +- lib/tkextlib/iwidgets/scrolledwidget.rb | 2 +- lib/tkextlib/iwidgets/selectionbox.rb | 2 +- lib/tkextlib/iwidgets/selectiondialog.rb | 2 +- lib/tkextlib/iwidgets/shell.rb | 2 +- lib/tkextlib/iwidgets/spindate.rb | 2 +- lib/tkextlib/iwidgets/spinint.rb | 2 +- lib/tkextlib/iwidgets/spinner.rb | 2 +- lib/tkextlib/iwidgets/spintime.rb | 2 +- lib/tkextlib/iwidgets/tabnotebook.rb | 2 +- lib/tkextlib/iwidgets/tabset.rb | 2 +- lib/tkextlib/iwidgets/timeentry.rb | 2 +- lib/tkextlib/iwidgets/timefield.rb | 2 +- lib/tkextlib/iwidgets/toolbar.rb | 2 +- lib/tkextlib/iwidgets/watch.rb | 2 +- lib/tkextlib/pkg_checker.rb | 2 +- lib/tkextlib/tcllib.rb | 2 +- lib/tkextlib/tcllib/autoscroll.rb | 2 +- lib/tkextlib/tcllib/calendar.rb | 2 +- lib/tkextlib/tcllib/canvas_sqmap.rb | 2 +- lib/tkextlib/tcllib/canvas_zoom.rb | 2 +- lib/tkextlib/tcllib/chatwidget.rb | 2 +- lib/tkextlib/tcllib/crosshair.rb | 2 +- lib/tkextlib/tcllib/ctext.rb | 2 +- lib/tkextlib/tcllib/cursor.rb | 2 +- lib/tkextlib/tcllib/dateentry.rb | 2 +- lib/tkextlib/tcllib/datefield.rb | 2 +- lib/tkextlib/tcllib/diagrams.rb | 2 +- lib/tkextlib/tcllib/dialog.rb | 2 +- lib/tkextlib/tcllib/getstring.rb | 2 +- lib/tkextlib/tcllib/history.rb | 2 +- lib/tkextlib/tcllib/ico.rb | 2 +- lib/tkextlib/tcllib/ip_entry.rb | 2 +- lib/tkextlib/tcllib/khim.rb | 2 +- lib/tkextlib/tcllib/menuentry.rb | 2 +- lib/tkextlib/tcllib/ntext.rb | 2 +- lib/tkextlib/tcllib/panelframe.rb | 2 +- lib/tkextlib/tcllib/plotchart.rb | 2 +- lib/tkextlib/tcllib/ruler.rb | 2 +- lib/tkextlib/tcllib/screenruler.rb | 2 +- lib/tkextlib/tcllib/scrolledwindow.rb | 2 +- lib/tkextlib/tcllib/scrollwin.rb | 2 +- lib/tkextlib/tcllib/statusbar.rb | 2 +- lib/tkextlib/tcllib/style.rb | 2 +- lib/tkextlib/tcllib/superframe.rb | 2 +- lib/tkextlib/tcllib/swaplist.rb | 2 +- lib/tkextlib/tcllib/tablelist.rb | 2 +- lib/tkextlib/tcllib/tablelist_tile.rb | 2 +- lib/tkextlib/tcllib/tkpiechart.rb | 2 +- lib/tkextlib/tcllib/toolbar.rb | 2 +- lib/tkextlib/tcllib/tooltip.rb | 2 +- lib/tkextlib/tcllib/validator.rb | 2 +- lib/tkextlib/tcllib/widget.rb | 2 +- lib/tkextlib/tclx/tclx.rb | 2 +- lib/tkextlib/tile.rb | 2 +- lib/tkextlib/tile/dialog.rb | 2 +- lib/tkextlib/tile/sizegrip.rb | 2 +- lib/tkextlib/tile/style.rb | 2 +- lib/tkextlib/tile/tbutton.rb | 2 +- lib/tkextlib/tile/tcheckbutton.rb | 2 +- lib/tkextlib/tile/tcombobox.rb | 2 +- lib/tkextlib/tile/tentry.rb | 2 +- lib/tkextlib/tile/tframe.rb | 2 +- lib/tkextlib/tile/tlabel.rb | 2 +- lib/tkextlib/tile/tlabelframe.rb | 2 +- lib/tkextlib/tile/tmenubutton.rb | 2 +- lib/tkextlib/tile/tnotebook.rb | 2 +- lib/tkextlib/tile/tpaned.rb | 2 +- lib/tkextlib/tile/tprogressbar.rb | 2 +- lib/tkextlib/tile/tradiobutton.rb | 2 +- lib/tkextlib/tile/treeview.rb | 2 +- lib/tkextlib/tile/tscale.rb | 2 +- lib/tkextlib/tile/tscrollbar.rb | 2 +- lib/tkextlib/tile/tseparator.rb | 2 +- lib/tkextlib/tile/tspinbox.rb | 2 +- lib/tkextlib/tile/tsquare.rb | 2 +- lib/tkextlib/tkDND.rb | 2 +- lib/tkextlib/tkDND/shape.rb | 2 +- lib/tkextlib/tkDND/tkdnd.rb | 2 +- lib/tkextlib/tkHTML/htmlwidget.rb | 2 +- lib/tkextlib/tkimg.rb | 2 +- lib/tkextlib/tkimg/bmp.rb | 2 +- lib/tkextlib/tkimg/dted.rb | 2 +- lib/tkextlib/tkimg/gif.rb | 2 +- lib/tkextlib/tkimg/ico.rb | 2 +- lib/tkextlib/tkimg/jpeg.rb | 2 +- lib/tkextlib/tkimg/pcx.rb | 2 +- lib/tkextlib/tkimg/pixmap.rb | 2 +- lib/tkextlib/tkimg/png.rb | 2 +- lib/tkextlib/tkimg/ppm.rb | 2 +- lib/tkextlib/tkimg/ps.rb | 2 +- lib/tkextlib/tkimg/raw.rb | 2 +- lib/tkextlib/tkimg/sgi.rb | 2 +- lib/tkextlib/tkimg/sun.rb | 2 +- lib/tkextlib/tkimg/tga.rb | 2 +- lib/tkextlib/tkimg/tiff.rb | 2 +- lib/tkextlib/tkimg/window.rb | 2 +- lib/tkextlib/tkimg/xbm.rb | 2 +- lib/tkextlib/tkimg/xpm.rb | 2 +- lib/tkextlib/tktable.rb | 2 +- lib/tkextlib/tktable/tktable.rb | 2 +- lib/tkextlib/tktrans.rb | 2 +- lib/tkextlib/tktrans/tktrans.rb | 2 +- lib/tkextlib/treectrl/tktreectrl.rb | 2 +- lib/tkextlib/trofs/trofs.rb | 2 +- lib/tkextlib/vu.rb | 2 +- lib/tkextlib/vu/bargraph.rb | 2 +- lib/tkextlib/vu/charts.rb | 2 +- lib/tkextlib/vu/dial.rb | 2 +- lib/tkextlib/vu/pie.rb | 2 +- lib/tkextlib/vu/spinbox.rb | 2 +- lib/tkextlib/winico.rb | 2 +- lib/tkextlib/winico/winico.rb | 2 +- 288 files changed, 288 insertions(+), 288 deletions(-) diff --git a/lib/multi-tk.rb b/lib/multi-tk.rb index d291c926..e1f261f2 100644 --- a/lib/multi-tk.rb +++ b/lib/multi-tk.rb @@ -3519,4 +3519,4 @@ class MultiTkIp module TkCore INTERP = MultiTkIp end -require 'tk' +require 'tk' unless defined?(Tk) diff --git a/lib/thread_tk.rb b/lib/thread_tk.rb index 69ed9386..54b75ae6 100644 --- a/lib/thread_tk.rb +++ b/lib/thread_tk.rb @@ -10,4 +10,4 @@ end module TkCore; RUN_EVENTLOOP_ON_MAIN_THREAD = false; end -require 'tk' +require 'tk' unless defined?(Tk) diff --git a/lib/tk/bgerror.rb b/lib/tk/bgerror.rb index 7b4f625e..f5629ba8 100644 --- a/lib/tk/bgerror.rb +++ b/lib/tk/bgerror.rb @@ -3,7 +3,7 @@ # tkbgerror -- bgerror ( tkerror ) module # 1998/07/16 by Hidetoshi Nagai # -require 'tk' +require 'tk' unless defined?(Tk) module TkBgError extend Tk diff --git a/lib/tk/bindtag.rb b/lib/tk/bindtag.rb index 71b80395..3789eaa0 100644 --- a/lib/tk/bindtag.rb +++ b/lib/tk/bindtag.rb @@ -2,7 +2,7 @@ # # tk/bind.rb : control event binding # -require 'tk' +require 'tk' unless defined?(Tk) class TkBindTag include TkBindCore diff --git a/lib/tk/busy.rb b/lib/tk/busy.rb index 18ebede9..a5c7c863 100644 --- a/lib/tk/busy.rb +++ b/lib/tk/busy.rb @@ -2,7 +2,7 @@ # # tk/busy.rb: support 'tk busy' command (Tcl/Tk8.6 or later) # -require 'tk' +require 'tk' unless defined?(Tk) module Tk::Busy include TkCore diff --git a/lib/tk/button.rb b/lib/tk/button.rb index dc252d8e..7a800d52 100644 --- a/lib/tk/button.rb +++ b/lib/tk/button.rb @@ -2,7 +2,7 @@ # # tk/button.rb : treat button widget # -require 'tk' +require 'tk' unless defined?(Tk) require 'tk/label' class Tk::Button # -require 'tk' +require 'tk' unless defined?(Tk) require 'tk/canvastag' require 'tk/itemconfig' require 'tk/scrollable' diff --git a/lib/tk/canvastag.rb b/lib/tk/canvastag.rb index 9aede092..6f777de1 100644 --- a/lib/tk/canvastag.rb +++ b/lib/tk/canvastag.rb @@ -2,7 +2,7 @@ # # tk/canvastag.rb - methods for treating canvas tags # -require 'tk' +require 'tk' unless defined?(Tk) require 'tk/tagfont' module TkcTagAccess diff --git a/lib/tk/checkbutton.rb b/lib/tk/checkbutton.rb index 521b015b..5848714e 100644 --- a/lib/tk/checkbutton.rb +++ b/lib/tk/checkbutton.rb @@ -2,7 +2,7 @@ # # tk/checkbutton.rb : treat checkbutton widget # -require 'tk' +require 'tk' unless defined?(Tk) require 'tk/radiobutton' class Tk::CheckButton -require 'tk' +require 'tk' unless defined?(Tk) require 'tk/label' require 'tk/scrollable' require 'tk/validation' diff --git a/lib/tk/font.rb b/lib/tk/font.rb index 3c4475d1..c76481cb 100644 --- a/lib/tk/font.rb +++ b/lib/tk/font.rb @@ -4,7 +4,7 @@ # # by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) # -require 'tk' +require 'tk' unless defined?(Tk) class TkFont include Tk diff --git a/lib/tk/fontchooser.rb b/lib/tk/fontchooser.rb index fb220da2..01212260 100644 --- a/lib/tk/fontchooser.rb +++ b/lib/tk/fontchooser.rb @@ -2,7 +2,7 @@ # # tk/fontchooser.rb -- "tk fontchooser" support (Tcl/Tk8.6 or later) # -require 'tk' +require 'tk' unless defined?(Tk) require 'tk/font' module TkFont::Chooser diff --git a/lib/tk/frame.rb b/lib/tk/frame.rb index 0682faf3..dbac6e7f 100644 --- a/lib/tk/frame.rb +++ b/lib/tk/frame.rb @@ -2,7 +2,7 @@ # # tk/frame.rb : treat frame widget # -require 'tk' +require 'tk' unless defined?(Tk) class Tk::Frame # -require 'tk' +require 'tk' unless defined?(Tk) module TkManageFocus extend Tk diff --git a/lib/tk/msgcat.rb b/lib/tk/msgcat.rb index 486941d2..29c1dcea 100644 --- a/lib/tk/msgcat.rb +++ b/lib/tk/msgcat.rb @@ -3,7 +3,7 @@ # tk/msgcat.rb : methods for Tcl message catalog # by Hidetoshi Nagai # -require 'tk' +require 'tk' unless defined?(Tk) #class TkMsgCatalog class TkMsgCatalog < TkObject diff --git a/lib/tk/namespace.rb b/lib/tk/namespace.rb index aa09fb36..313a0799 100644 --- a/lib/tk/namespace.rb +++ b/lib/tk/namespace.rb @@ -3,7 +3,7 @@ # tk/namespace.rb : methods to manipulate Tcl/Tk namespace # by Hidetoshi Nagai # -require 'tk' +require 'tk' unless defined?(Tk) class TkNamespace < TkObject extend Tk diff --git a/lib/tk/optiondb.rb b/lib/tk/optiondb.rb index 34d49aae..d8e66c5a 100644 --- a/lib/tk/optiondb.rb +++ b/lib/tk/optiondb.rb @@ -2,7 +2,7 @@ # # tk/optiondb.rb : treat option database # -require 'tk' +require 'tk' unless defined?(Tk) module TkOptionDB include Tk diff --git a/lib/tk/optionobj.rb b/lib/tk/optionobj.rb index 28f957fa..a258248b 100644 --- a/lib/tk/optionobj.rb +++ b/lib/tk/optionobj.rb @@ -8,7 +8,7 @@ # e.g. hash_kv({'aaa'=>1, 'bbb'=>Tk::None, 'ccc'=>3}) # => ["-aaa", 1, "-bbb", "-ccc", 3] # -require 'tk' +require 'tk' unless defined?(Tk) module Tk class OptionObj < Hash diff --git a/lib/tk/pack.rb b/lib/tk/pack.rb index 45926d40..9aad2b05 100644 --- a/lib/tk/pack.rb +++ b/lib/tk/pack.rb @@ -2,7 +2,7 @@ # # tk/pack.rb : control pack geometry manager # -require 'tk' +require 'tk' unless defined?(Tk) module TkPack include Tk diff --git a/lib/tk/package.rb b/lib/tk/package.rb index fe6939c2..4ded5c96 100644 --- a/lib/tk/package.rb +++ b/lib/tk/package.rb @@ -2,7 +2,7 @@ # # tk/package.rb : package command # -require 'tk' +require 'tk' unless defined?(Tk) module TkPackage include TkCore diff --git a/lib/tk/palette.rb b/lib/tk/palette.rb index e118e8db..a8b560f7 100644 --- a/lib/tk/palette.rb +++ b/lib/tk/palette.rb @@ -3,7 +3,7 @@ # tk/palette.rb : methods for Tcl/Tk standard library 'palette.tcl' # 1998/06/21 by Hidetoshi Nagai # -require 'tk' +require 'tk' unless defined?(Tk) module TkPalette include Tk diff --git a/lib/tk/panedwindow.rb b/lib/tk/panedwindow.rb index 285292f0..a8693856 100644 --- a/lib/tk/panedwindow.rb +++ b/lib/tk/panedwindow.rb @@ -2,7 +2,7 @@ # # tk/panedwindow.rb : treat panedwindow # -require 'tk' +require 'tk' unless defined?(Tk) class Tk::PanedWindow # -require 'tk' +require 'tk' unless defined?(Tk) require 'tk/listbox' class TkScrollbox # -require 'tk' +require 'tk' unless defined?(Tk) require 'tk/entry' class Tk::Spinbox -require 'tk' +require 'tk' unless defined?(Tk) require 'tk/itemfont' require 'tk/itemconfig' require 'tk/scrollable' diff --git a/lib/tk/textimage.rb b/lib/tk/textimage.rb index f7329c5d..a4b959e0 100644 --- a/lib/tk/textimage.rb +++ b/lib/tk/textimage.rb @@ -2,7 +2,7 @@ # # tk/textimage.rb - treat Tk text image object # -require 'tk' +require 'tk' unless defined?(Tk) require 'tk/text' class TkTextImage # -require 'tk' +require 'tk' unless defined?(Tk) class TkVirtualEvent/tkextlib/vu.rb diff --git a/lib/tkextlib/vu/dial.rb b/lib/tkextlib/vu/dial.rb index 7eb5650d..2bd12442 100644 --- a/lib/tkextlib/vu/dial.rb +++ b/lib/tkextlib/vu/dial.rb @@ -3,7 +3,7 @@ # ::vu::dial widget # by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) # -require 'tk' +require 'tk' unless defined?(Tk) # create module/class module Tk diff --git a/lib/tkextlib/vu/pie.rb b/lib/tkextlib/vu/pie.rb index f7e9cf54..7f3b7248 100644 --- a/lib/tkextlib/vu/pie.rb +++ b/lib/tkextlib/vu/pie.rb @@ -3,7 +3,7 @@ # ::vu::pie widget # by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) # -require 'tk' +require 'tk' unless defined?(Tk) # create module/class module Tk diff --git a/lib/tkextlib/vu/spinbox.rb b/lib/tkextlib/vu/spinbox.rb index 082ebd1f..37b16f3c 100644 --- a/lib/tkextlib/vu/spinbox.rb +++ b/lib/tkextlib/vu/spinbox.rb @@ -6,7 +6,7 @@ # a standard spinbox (<= 8.3) # This is the same as the 8.4 core spinbox widget. # -require 'tk' +require 'tk' unless defined?(Tk) if (Tk::TK_MAJOR_VERSION < 8 || (Tk::TK_MAJOR_VERSION == 8 && Tk::TK_MINOR_VERSION < 4)) diff --git a/lib/tkextlib/winico.rb b/lib/tkextlib/winico.rb index 996fc409..e908d466 100644 --- a/lib/tkextlib/winico.rb +++ b/lib/tkextlib/winico.rb @@ -3,7 +3,7 @@ # winico -- Windows Icon extension support # by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) # -require 'tk' +require 'tk' unless defined?(Tk) # call setup script for general 'tkextlib' libraries require 'tkextlib/setup.rb' diff --git a/lib/tkextlib/winico/winico.rb b/lib/tkextlib/winico/winico.rb index dda0357a..62eccc7c 100644 --- a/lib/tkextlib/winico/winico.rb +++ b/lib/tkextlib/winico/winico.rb @@ -4,7 +4,7 @@ # by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) # -require 'tk' +require 'tk' unless defined?(Tk) # call setup script for general 'tkextlib' libraries require 'tkextlib/setup.rb'