Documentation typos

[ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
a_matsuda 2015-12-27 09:57:21 +00:00
parent 98e3c058fa
commit 73a37eb325
46 changed files with 76 additions and 76 deletions

View file

@ -232,7 +232,7 @@ module TclTklib
_merge_tklist(str, str, ... ) _merge_tklist(str, str, ... )
: Get a Tcl's list string from arguments with a Tcl/Tk's : Get a Tcl's list string from arguments with a Tcl/Tk's
: library function. Each arguemnt is converted to a valid : library function. Each argument is converted to a valid
: Tcl list element. : Tcl list element.
_conv_listelement(str) _conv_listelement(str)
@ -415,7 +415,7 @@ class TclTkIp
_merge_tklist(str, str, ... ) _merge_tklist(str, str, ... )
: Get a Tcl's list string from arguments with a Tcl/Tk's : Get a Tcl's list string from arguments with a Tcl/Tk's
: library function. Each arguemnt is converted to a valid : library function. Each argument is converted to a valid
: Tcl list element. : Tcl list element.
_conv_listelement(str) _conv_listelement(str)

View file

@ -113,7 +113,7 @@ end
############################################################## ##############################################################
# fuctions # functions
############################################################## ##############################################################
def is_win32? def is_win32?
/mswin|mingw|cygwin|bccwin/ =~ RUBY_PLATFORM /mswin|mingw|cygwin|bccwin/ =~ RUBY_PLATFORM

View file

@ -41,7 +41,7 @@ end
################################################ ################################################
# exceptiopn to treat the return value from IP # exception to treat the return value from IP
class MultiTkIp_OK < Exception class MultiTkIp_OK < Exception
def self.send(thread, ret=nil) def self.send(thread, ret=nil)
thread.raise self.new(ret) thread.raise self.new(ret)

View file

@ -2645,7 +2645,7 @@ if (/^(8\.[1-9]|9\.|[1-9][0-9])/ =~ Tk::TCL_VERSION && !Tk::JAPANIZED_TK)
def ENCODING_TABLE.get_name(enc) def ENCODING_TABLE.get_name(enc)
orig_enc = enc orig_enc = enc
# unles enc, use system default # unless enc, use system default
# 1st: Ruby/Tk default encoding # 1st: Ruby/Tk default encoding
# 2nd: Tcl/Tk default encoding # 2nd: Tcl/Tk default encoding
# 3rd: Ruby's default_external # 3rd: Ruby's default_external
@ -2887,7 +2887,7 @@ if (/^(8\.[1-9]|9\.|[1-9][0-9])/ =~ Tk::TCL_VERSION && !Tk::JAPANIZED_TK)
# from tkencoding.rb by ttate@jaist.ac.jp # from tkencoding.rb by ttate@jaist.ac.jp
#attr_accessor :encoding #attr_accessor :encoding
def encoding=(name) def encoding=(name)
self.force_default_encoding = true # for comaptibility self.force_default_encoding = true # for compatibility
self.default_encoding = name self.default_encoding = name
end end
@ -5165,7 +5165,7 @@ class TkWindow<TkObject
# try to configure # try to configure
configure(keys) configure(keys)
rescue rescue
# fail => includes options adaptable when creattion only? # fail => includes options adaptable when creation only?
begin begin
tk_call_without_enc('destroy', @path) tk_call_without_enc('destroy', @path)
rescue rescue

View file

@ -499,7 +499,7 @@ class << Tk
replace_topobj(sym, obj) replace_topobj(sym, obj)
else # current_obj != topalias_defined?(sym) else # current_obj != topalias_defined?(sym)
# Maybe current_obj is defined by user. --> OWNER[sym] = faise # Maybe current_obj is defined by user. --> OWNER[sym] = false
# Keep Object::sym. # Keep Object::sym.
@TOPLEVEL_ALIAS_OWNER[sym] = false @TOPLEVEL_ALIAS_OWNER[sym] = false
@TOPLEVEL_ALIAS_TABLE[target][sym] = obj @TOPLEVEL_ALIAS_TABLE[target][sym] = obj
@ -542,7 +542,7 @@ class << Tk
else # NOT topalias_defined?(sym) else # NOT topalias_defined?(sym)
# Nobody controls ALIAS[sym]. # Nobody controls ALIAS[sym].
# At leaset, current widget set doesn't control ALIAS[sym]. # At least, current widget set doesn't control ALIAS[sym].
# Keep Object::sym (even if it is not defined) # Keep Object::sym (even if it is not defined)
# Keep OWNER[sym]. # Keep OWNER[sym].
@TOPLEVEL_ALIAS_TABLE[target][sym] = obj @TOPLEVEL_ALIAS_TABLE[target][sym] = obj
@ -610,20 +610,20 @@ class << Tk
if cur_obj = topobj_defined?(sym) if cur_obj = topobj_defined?(sym)
if ! cur_obj.kind_of?(String) && (cur_alias = topalias_defined?(sym)) if ! cur_obj.kind_of?(String) && (cur_alias = topalias_defined?(sym))
if cur_alias.kind_of?(String) if cur_alias.kind_of?(String)
# Mayby, user replaced Object::sym. # Maybe, user replaced Object::sym.
# Make Object::sym out of control. # Make Object::sym out of control.
@TOPLEVEL_ALIAS_OWNER[sym] = false @TOPLEVEL_ALIAS_OWNER[sym] = false
elsif cur_obj == cur_alias elsif cur_obj == cur_alias
# Possibley, defined normally. Backup it # Possibly, defined normally. Backup it
@TOPLEVEL_ALIAS_TABLE[current][sym] = cur_alias @TOPLEVEL_ALIAS_TABLE[current][sym] = cur_alias
else else
# Mayby, user replaced Object::sym. # Maybe, user replaced Object::sym.
# Make Object::sym out of control. # Make Object::sym out of control.
@TOPLEVEL_ALIAS_OWNER[sym] = false @TOPLEVEL_ALIAS_OWNER[sym] = false
end end
end end
else else
# Mayby, user replaced Object::sym. # Maybe, user replaced Object::sym.
# Make Object::sym out of control. # Make Object::sym out of control.
@TOPLEVEL_ALIAS_OWNER[sym] = false @TOPLEVEL_ALIAS_OWNER[sym] = false
end end
@ -631,7 +631,7 @@ class << Tk
when nil when nil
# Object::sym is out of control. # Object::sym is out of control.
if (cur_alias = topalias_defined?(sym)) && ! cur_alias.kind_of?(String) if (cur_alias = topalias_defined?(sym)) && ! cur_alias.kind_of?(String)
# Possibley, defined normally. Backup it. # Possibly, defined normally. Backup it.
@TOPLEVEL_ALIAS_TABLE[current][sym] = cur_alias @TOPLEVEL_ALIAS_TABLE[current][sym] = cur_alias
end end
else else

View file

@ -1787,7 +1787,7 @@ module TkFont::CoreMethods
tk_call('font', 'configure', font, tk_call('font', 'configure', font,
"-#{slot}", value, '-pointadjust', padjust) "-#{slot}", value, '-pointadjust', padjust)
elsif JAPANIZED_TK && (slot == 'family' || slot == :family) elsif JAPANIZED_TK && (slot == 'family' || slot == :family)
# coumpund font? # compound font?
begin begin
compound = tk_split_simplelist(tk_call('font', 'configure', compound = tk_split_simplelist(tk_call('font', 'configure',
font, '-compound')) font, '-compound'))

View file

@ -525,7 +525,7 @@ Tk.__set_loaded_toplevel_aliases__('tk/menu.rb', :Tk, Tk::SysMenu_System,
class Tk::SysMenu_Apple<Tk::Menu class Tk::SysMenu_Apple<Tk::Menu
# for Machintosh # for Macintosh
include Tk::SystemMenu include Tk::SystemMenu
SYSMENU_NAME = 'apple' SYSMENU_NAME = 'apple'
end end

View file

@ -80,7 +80,7 @@
# 'font'=>'Helvetia 12 bold') # 'font'=>'Helvetia 12 bold')
# menubar.pack('side'=>'top', 'fill'=>'x') # menubar.pack('side'=>'top', 'fill'=>'x')
# See tk/menuspce.rb about the format of the menu_spec # See tk/menuspec.rb about the format of the menu_spec
# To use add_menu, configuration must be done by calling configure after # To use add_menu, configuration must be done by calling configure after
# adding all menus by add_menu, not by the constructor arguments. # adding all menus by add_menu, not by the constructor arguments.

View file

@ -1,7 +1,7 @@
# frozen_string_literal: false # frozen_string_literal: false
# #
# tk/menuspec.rb # tk/menuspec.rb
# Hidethoshi NAGAI (nagai@ai.kyutech.ac.jp) # Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
# #
# based on tkmenubar.rb : # based on tkmenubar.rb :
# Copyright (C) 1998 maeda shugo. All rights reserved. # Copyright (C) 1998 maeda shugo. All rights reserved.
@ -30,7 +30,7 @@
# [ entry_info, entry_info, ... ] # [ entry_info, entry_info, ... ]
# #
# #
# underline, accelerator, and configs are optional pearameters. # underline, accelerator, and configs are optional parameters.
# Hashes are OK instead of Arrays. Then the entry type ('command', # Hashes are OK instead of Arrays. Then the entry type ('command',
# 'checkbutton', 'radiobutton' or 'cascade') is given by 'type' key # 'checkbutton', 'radiobutton' or 'cascade') is given by 'type' key
# (e.g. :type=>'cascade'). When type is 'cascade', an array of menu_info # (e.g. :type=>'cascade'). When type is 'cascade', an array of menu_info

View file

@ -59,7 +59,7 @@ module TkOptionDB
when /\\$/ # continue when /\\$/ # continue
cline.chop! cline.chop!
next next
when /^\s*(!|#)/ # coment when /^\s*(!|#)/ # comment
cline = '' cline = ''
next next
when /^([^:]+):(.*)$/ when /^([^:]+):(.*)$/
@ -103,7 +103,7 @@ module TkOptionDB
when /\\$/ # continue when /\\$/ # continue
cline.chop! cline.chop!
next next
when /^\s*!/ # coment when /^\s*!/ # comment
cline = '' cline = ''
next next
when /^([^:]+):\s(.*)$/ when /^([^:]+):\s(.*)$/
@ -341,7 +341,7 @@ module TkOptionDB
# define new proc class : # define new proc class :
# If you want to modify the new class or create a new subclass, # If you want to modify the new class or create a new subclass,
# you must do such operation in the block parameter. # you must do such operation in the block parameter.
# Because the created class is flozen after evaluating the block. # Because the created class is frozen after evaluating the block.
def new_proc_class(klass, func, safe = 4, add = false, parent = nil, &b) def new_proc_class(klass, func, safe = 4, add = false, parent = nil, &b)
new_klass = __create_new_class(klass, func, safe, add, parent) new_klass = __create_new_class(klass, func, safe, add, parent)
new_klass.class_eval(&b) if block_given? new_klass.class_eval(&b) if block_given?

View file

@ -32,7 +32,7 @@ class Tk::Root<TkWindow
} }
} }
if keys # wm commands ( for backward comaptibility ) if keys # wm commands ( for backward compatibility )
keys.each{|k,v| keys.each{|k,v|
if v.kind_of? Array if v.kind_of? Array
root.__send__(k,*v) root.__send__(k,*v)

View file

@ -1463,7 +1463,7 @@ class Tk::Text<TkTextWin
val, i = _retrieve_braced_text(str, i) val, i = _retrieve_braced_text(str, i)
result.push val result.push val
else else
# text which may contain backslahes # text which may contain backslashes
val, i = _retrieve_backslashed_text(str, i) val, i = _retrieve_backslashed_text(str, i)
result.push val result.push val
end end

View file

@ -182,7 +182,7 @@ class TkTimer
@cancel_on_exception = DEFAULT_IGNORE_EXCEPTIONS @cancel_on_exception = DEFAULT_IGNORE_EXCEPTIONS
# Unless @cancel_on_exception, Ruby/Tk shows an error dialog box when # Unless @cancel_on_exception, Ruby/Tk shows an error dialog box when
# an excepsion is raised on TkTimer callback procedure. # an exception is raised on TkTimer callback procedure.
# If @cancel_on_exception is an array of exception classes and the raised # If @cancel_on_exception is an array of exception classes and the raised
# exception is included in the array, Ruby/Tk cancels executing TkTimer # exception is included in the array, Ruby/Tk cancels executing TkTimer
# callback procedures silently (TkTimer#cancel is called and no dialog is # callback procedures silently (TkTimer#cancel is called and no dialog is

View file

@ -1,6 +1,6 @@
# frozen_string_literal: false # frozen_string_literal: false
# #
# tk/txtwin_abst.rb : TkTextWin abstruct class # tk/txtwin_abst.rb : TkTextWin abstract class
# #
require 'tk' require 'tk'

View file

@ -311,7 +311,7 @@ module Tk
# -------------------------------------------------------------- # --------------------------------------------------------------
# In the future release, I want to support to embed the 'win' # In the future release, I want to support to embed the 'win'
# into the container which has window-id 'use-id'. # into the container which has window-id 'use-id'.
# It may give users frexibility on controlling their GUI. # It may give users flexibility on controlling their GUI.
# However, it may be difficult for current Tcl/Tk (Tcl/Tk8.5.1), # However, it may be difficult for current Tcl/Tk (Tcl/Tk8.5.1),
# because it seems to require to modify Tcl/Tk's source code. # because it seems to require to modify Tcl/Tk's source code.
# -------------------------------------------------------------- # --------------------------------------------------------------

View file

@ -1,6 +1,6 @@
# frozen_string_literal: false # frozen_string_literal: false
# #
# tk/xim.rb : control imput_method # tk/xim.rb : control input_method
# #
require 'tk' require 'tk'

View file

@ -31,7 +31,7 @@ class Tk::BWidget::ListBox
class Event_for_Items < TkEvent::Event class Event_for_Items < TkEvent::Event
def self._get_extra_args_tbl def self._get_extra_args_tbl
[ [
TkComm.method(:string) # item idenfier TkComm.method(:string) # item identifier
] ]
end end
end end

View file

@ -25,7 +25,7 @@ class Tk::BWidget::NoteBook
class Event_for_Tabs < TkEvent::Event class Event_for_Tabs < TkEvent::Event
def self._get_extra_args_tbl def self._get_extra_args_tbl
[ [
TkComm.method(:string) # page idenfier TkComm.method(:string) # page identifier
] ]
end end
end end

View file

@ -28,7 +28,7 @@ class Tk::BWidget::Tree
class Event_for_Items < TkEvent::Event class Event_for_Items < TkEvent::Event
def self._get_extra_args_tbl def self._get_extra_args_tbl
[ [
TkComm.method(:string) # item idenfier TkComm.method(:string) # item identifier
] ]
end end
end end

View file

@ -20,7 +20,7 @@ class Tk::Iwidgets::Shell
WidgetClassNames[WidgetClassName] ||= self WidgetClassNames[WidgetClassName] ||= self
def activate def activate
tk_call(@path, 'activate') # may return val of deactibate method tk_call(@path, 'activate') # may return val of deactivate method
end end
def center(win=None) def center(win=None)

View file

@ -1,6 +1,6 @@
# frozen_string_literal: false # frozen_string_literal: false
# #
# tkextlib/tcllib/tablelist_tlie.rb # tkextlib/tcllib/tablelist_tile.rb
# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) # by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
# #
# * Part of tcllib extension # * Part of tcllib extension

View file

@ -1,6 +1,6 @@
# frozen_string_literal: false # frozen_string_literal: false
# #
# Tile theme engin (tile widget set) support # Tile theme engine (tile widget set) support
# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) # by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
# #
@ -133,14 +133,14 @@ module Tk
def self.__define_LoadImages_proc_for_compatibility__! def self.__define_LoadImages_proc_for_compatibility__!
# Ttk 8.5 (Tile 0.8) lost 'LoadImages' utility procedure. # Ttk 8.5 (Tile 0.8) lost 'LoadImages' utility procedure.
# So, some old scripts doen't work, because those scripts use the # So, some old scripts don't work, because those scripts use the
# procedure to define local styles. # procedure to define local styles.
# Of course, rewriting such Tcl/Tk scripts isn't difficult for # Of course, rewriting such Tcl/Tk scripts isn't difficult for
# Tcl/Tk users. However, it may be troublesome for Ruby/Tk users # Tcl/Tk users. However, it may be troublesome for Ruby/Tk users
# who use such Tcl/Tk scripts as it is. # who use such Tcl/Tk scripts as it is.
# This method may help Ruby/Tk users who don't want to modify old # This method may help Ruby/Tk users who don't want to modify old
# Tcl/Tk scripts for the latest version of Ttk (Tile) extension. # Tcl/Tk scripts for the latest version of Ttk (Tile) extension.
# This method defines a comaptible 'LoadImages' procedure on the # This method defines a compatible 'LoadImages' procedure on the
# Tcl/Tk interpreter working under Ruby/Tk. # Tcl/Tk interpreter working under Ruby/Tk.
# Please give attention to use this method. It may conflict with # Please give attention to use this method. It may conflict with
# some definitions on Tcl/Tk scripts. # some definitions on Tcl/Tk scripts.

View file

@ -32,7 +32,7 @@ end
# selectAndLoadDir3 -- # selectAndLoadDir3 --
# This procedure pops up a dialog to ask for a directory to load into # This procedure pops up a dialog to ask for a directory to load into
# the listobx and (if the user presses OK) reloads the directory # the listbox and (if the user presses OK) reloads the directory
# listbox from the directory named in the demo's entry. # listbox from the directory named in the demo's entry.
# #
# Arguments: # Arguments:

View file

@ -43,7 +43,7 @@ EOL
end end
## Set up the toolbar hull ## Set up the toolbar hull
tbar_base = Tk::Frame.new(base_frame, # Must be a starndard Tk frame! tbar_base = Tk::Frame.new(base_frame, # Must be a standard Tk frame!
:widgetname=>'toolbar') # for window title :widgetname=>'toolbar') # for window title
sep = Ttk::Separator.new(base_frame) sep = Ttk::Separator.new(base_frame)
to_base = Ttk::Frame.new(tbar_base, :cursor=>'fleur') to_base = Ttk::Frame.new(tbar_base, :cursor=>'fleur')

View file

@ -43,7 +43,7 @@ notebook = Ttk::Notebook.new(base_frame).pack(:fill=>:both, :expand=>true,
:padx=>2, :pady=>3) :padx=>2, :pady=>3)
notebook.enable_traversal notebook.enable_traversal
## Popuplate the first pane ## Populate the first pane
f_msg = Ttk::Frame.new(notebook) f_msg = Ttk::Frame.new(notebook)
msg_m = Ttk::Label.new(f_msg, :font=>$font, :wraplength=>'4i', msg_m = Ttk::Label.new(f_msg, :font=>$font, :wraplength=>'4i',
:justify=>:left, :anchor=>'n', :text=><<EOL) :justify=>:left, :anchor=>'n', :text=><<EOL)
@ -77,7 +77,7 @@ f_msg.grid_columnconfigure([0, 1], :weight=>1, :uniform=>1)
f_disabled = Ttk::Frame.new(notebook) f_disabled = Ttk::Frame.new(notebook)
notebook.add(f_disabled, :text=>'Disabled', :state=>:disabled) notebook.add(f_disabled, :text=>'Disabled', :state=>:disabled)
## Popuplate the third pane ## Populate the third pane
f_editor = Ttk::Frame.new(notebook) f_editor = Ttk::Frame.new(notebook)
notebook.add(f_editor, :text=>'Text Editor', :underline=>0) notebook.add(f_editor, :text=>'Text Editor', :underline=>0)
editor_t = Tk::Text.new(f_editor, :width=>40, :height=>10, :wrap=>:char) editor_t = Tk::Text.new(f_editor, :width=>40, :height=>10, :wrap=>:char)

View file

@ -33,7 +33,7 @@ end
# selectAndLoadDir3 -- # selectAndLoadDir3 --
# This procedure pops up a dialog to ask for a directory to load into # This procedure pops up a dialog to ask for a directory to load into
# the listobx and (if the user presses OK) reloads the directory # the listbox and (if the user presses OK) reloads the directory
# listbox from the directory named in the demo's entry. # listbox from the directory named in the demo's entry.
# #
# Arguments: # Arguments:

View file

@ -45,7 +45,7 @@ notebook = Ttk::Notebook.new(base_frame).pack(:fill=>:both, :expand=>true,
:padx=>2, :pady=>3) :padx=>2, :pady=>3)
notebook.enable_traversal notebook.enable_traversal
## Popuplate the first pane ## Populate the first pane
f_msg = Ttk::Frame.new(notebook) f_msg = Ttk::Frame.new(notebook)
msg_m = Ttk::Label.new(f_msg, :font=>$font, :wraplength=>'5i', msg_m = Ttk::Label.new(f_msg, :font=>$font, :wraplength=>'5i',
:justify=>:left, :anchor=>'n', :text=><<EOL) :justify=>:left, :anchor=>'n', :text=><<EOL)
@ -85,7 +85,7 @@ f_msg.grid_columnconfigure([0, 1], :weight=>1, :uniform=>1)
f_disabled = Ttk::Frame.new(notebook) f_disabled = Ttk::Frame.new(notebook)
notebook.add(f_disabled, :text=>'無効化されたタブ', :state=>:disabled) notebook.add(f_disabled, :text=>'無効化されたタブ', :state=>:disabled)
## Popuplate the third pane ## Populate the third pane
f_editor = Ttk::Frame.new(notebook) f_editor = Ttk::Frame.new(notebook)
notebook.add(f_editor, :text=>'テキストエディタ(Text Editor)', :underline=>9) notebook.add(f_editor, :text=>'テキストエディタ(Text Editor)', :underline=>9)
editor_t = Tk::Text.new(f_editor, :width=>40, :height=>10, :wrap=>:char) editor_t = Tk::Text.new(f_editor, :width=>40, :height=>10, :wrap=>:char)

View file

@ -2,7 +2,7 @@
# #
# Tk::RbWidget::Editable_Listbox class # Tk::RbWidget::Editable_Listbox class
# #
# When "DoubleClick-1" on a listbox item, the entry box is opend on the # When "DoubleClick-1" on a listbox item, the entry box is opened on the
# item. And when hit "Return" key on the entry box after modifying the # item. And when hit "Return" key on the entry box after modifying the
# text, the entry box is closed and the item is changed. Or when hit # text, the entry box is closed and the item is changed. Or when hit
# "Escape" key, the entry box is closed without modification. # "Escape" key, the entry box is closed without modification.

View file

@ -8,7 +8,7 @@ require 'tk'
radio_var = TkVariable.new('y') radio_var = TkVariable.new('y')
menu_spec = [ menu_spec = [
[['&File', true], # when underline option is ture, '&' index is the position [['&File', true], # when underline option is true, '&' index is the position
{:label=>'Open', :command=>proc{puts('Open clicked')}, :underline=>0}, {:label=>'Open', :command=>proc{puts('Open clicked')}, :underline=>0},
'---', '---',
['Check_A', TkVariable.new(true), 6], ['Check_A', TkVariable.new(true), 6],

View file

@ -7,8 +7,8 @@
# When it is configured, scrollregion of the container is changed. # When it is configured, scrollregion of the container is changed.
# #
# Scrollbars can be toggled by Tk::RbWidget::ScrollFrame#vscroll & hscroll. # Scrollbars can be toggled by Tk::RbWidget::ScrollFrame#vscroll & hscroll.
# If horizontal or virtical scrollbar is turned off, the horizontal # If horizontal or vertical scrollbar is turned off, the horizontal
# or virtical size of embedded widgets is propagated. # or vertical size of embedded widgets is propagated.
# #
# Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) # Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
# #
@ -34,7 +34,7 @@ class Tk::RbWidget::ScrollFrame < TkFrame
:borderwidth=>0, :selectborderwidth=>0, :borderwidth=>0, :selectborderwidth=>0,
:highlightthickness=>0) :highlightthickness=>0)
# allignment # alignment
TkGrid.rowconfigure(@frame, 0, 'weight'=>1, 'minsize'=>0) TkGrid.rowconfigure(@frame, 0, 'weight'=>1, 'minsize'=>0)
TkGrid.columnconfigure(@frame, 0, 'weight'=>1, 'minsize'=>0) TkGrid.columnconfigure(@frame, 0, 'weight'=>1, 'minsize'=>0)
@canvas.grid('row'=>0, 'column'=>0, 'sticky'=>'news') @canvas.grid('row'=>0, 'column'=>0, 'sticky'=>'news')

View file

@ -4,7 +4,7 @@
# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) # by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
# #
# Add a balloon help to a widget. # Add a balloon help to a widget.
# This widget has only poor featureas. If you need more useful features, # This widget has only poor features. If you need more useful features,
# please try to use the Tix extension of Tcl/Tk under Ruby/Tk. # please try to use the Tix extension of Tcl/Tk under Ruby/Tk.
# #
# The interval time to display a balloon help is defined 'interval' option # The interval time to display a balloon help is defined 'interval' option
@ -157,7 +157,7 @@ if __FILE__ == $0
sb = TkScrollbox.new.pack(:fill=>:x) sb = TkScrollbox.new.pack(:fill=>:x)
sb.insert(:end, *%w(aaa bbb ccc ddd eee fff ggg hhh iii jjj kkk lll mmm)) sb.insert(:end, *%w(aaa bbb ccc ddd eee fff ggg hhh iii jjj kkk lll mmm))
=begin =begin
# CASE1 : command takes no arguemnt # CASE1 : command takes no argument
bh = Tk::RbWidget::BalloonHelp.new(sb, :interval=>500, bh = Tk::RbWidget::BalloonHelp.new(sb, :interval=>500,
:relief=>:ridge, :background=>'white', :relief=>:ridge, :background=>'white',
:command=>proc{ :command=>proc{
@ -166,7 +166,7 @@ if __FILE__ == $0
}) })
=end =end
=begin =begin
# CASE2 : command takes 2 arguemnts # CASE2 : command takes 2 arguments
bh = Tk::RbWidget::BalloonHelp.new(sb, :interval=>500, bh = Tk::RbWidget::BalloonHelp.new(sb, :interval=>500,
:relief=>:ridge, :background=>'white', :relief=>:ridge, :background=>'white',
:command=>proc{|x, y| :command=>proc{|x, y|
@ -174,7 +174,7 @@ if __FILE__ == $0
}) })
=end =end
=begin =begin
# CASE3 : command takes 3 arguemnts # CASE3 : command takes 3 arguments
Tk::RbWidget::BalloonHelp.new(sb, :interval=>500, Tk::RbWidget::BalloonHelp.new(sb, :interval=>500,
:relief=>:ridge, :background=>'white', :relief=>:ridge, :background=>'white',
:command=>proc{|x, y, bhelp| :command=>proc{|x, y, bhelp|
@ -182,7 +182,7 @@ if __FILE__ == $0
}) })
=end =end
=begin =begin
# CASE4a : command is a Proc object and takes 4 arguemnts # CASE4a : command is a Proc object and takes 4 arguments
cmd = proc{|x, y, bhelp, parent| cmd = proc{|x, y, bhelp, parent|
bhelp.text "current index == #{parent.nearest(y)}" bhelp.text "current index == #{parent.nearest(y)}"
} }
@ -199,7 +199,7 @@ if __FILE__ == $0
:command=>cmd) :command=>cmd)
=end =end
#=begin #=begin
# CASE4b : command is a Method object and takes 4 arguemnts # CASE4b : command is a Method object and takes 4 arguments
def set_msg(x, y, bhelp, parent) def set_msg(x, y, bhelp, parent)
bhelp.text "current index == #{parent.nearest(y)}" bhelp.text "current index == #{parent.nearest(y)}"
end end

View file

@ -87,7 +87,7 @@ class BWidget_Demo
:progressvar=>DemoVar.prgindic :progressvar=>DemoVar.prgindic
) )
# toobar 1 creation # toolbar 1 creation
DemoVar.prgindic.numeric += 1 DemoVar.prgindic.numeric += 1
DemoVar.mainframe.add_toolbar{|tb1| DemoVar.mainframe.add_toolbar{|tb1|

View file

@ -2,7 +2,7 @@
# frozen_string_literal: false # frozen_string_literal: false
######################################################### #########################################################
# #
# use Tk::UTF8_String() for a utf8 charecter # use Tk::UTF8_String() for a utf8 character
# #
######################################################### #########################################################
require 'tk' require 'tk'

View file

@ -2,7 +2,7 @@
# frozen_string_literal: false # frozen_string_literal: false
######################################################### #########################################################
# #
# set $KCODE to 'utf' for a utf8 charecter # set $KCODE to 'utf' for a utf8 character
# #
######################################################### #########################################################
unless defined?(::Encoding.default_external) unless defined?(::Encoding.default_external)

View file

@ -2,7 +2,7 @@
# frozen_string_literal: false # frozen_string_literal: false
######################################################### #########################################################
# #
# set Tk.encoding = 'utf-8' for a utf8 charecter # set Tk.encoding = 'utf-8' for a utf8 character
# #
######################################################### #########################################################
require 'tk' require 'tk'

View file

@ -302,7 +302,7 @@ show_tbl.trace('w', proc{
show_img.trace('w', refresh) show_img.trace('w', refresh)
# If an arguent was specified, read it into the HTML widget. # If an argument was specified, read it into the HTML widget.
# #
Tk.update Tk.update
if file && file != "" if file && file != ""

View file

@ -114,7 +114,7 @@ EOD
@html.clipwin.focus @html.clipwin.focus
# If an arguent was specified, read it into the HTML widget. # If an argument was specified, read it into the HTML widget.
# #
Tk.update Tk.update
if file && file != "" if file && file != ""

View file

@ -62,7 +62,7 @@ table.bind('1', proc{|w, x, y|
end}, '%W %x %y') end}, '%W %x %y')
# inititialize the array, titles, and celltags # initialize the array, titles, and celltags
0.step(rows){|i| 0.step(rows){|i|
tab[i,-1] = i tab[i,-1] = i
0.step(cols){|j| 0.step(cols){|j|

View file

@ -31,7 +31,7 @@ m128_000.xbm
oscilloscope.tcl oscilloscope.tcl
the heart of a Realtime Oscilloscope,where the PC´s joystick the heart of a Realtime Oscilloscope,where the PC´s joystick
port gives 4 digtal inputs and 4 analog 8 bit values with an port gives 4 digital inputs and 4 analog 8 bit values with an
resolution of ~1 millisecond (!!!) running Realtime Linux. resolution of ~1 millisecond (!!!) running Realtime Linux.
<p> creates DEMO.ps <p> creates DEMO.ps

View file

@ -54,7 +54,7 @@ class TkMultiColumnList < TkText
@mode = :title @mode = :title
@command = nil @command = nil
# virtical scrollbar # vertical scrollbar
@v_scroll = TkYScrollbar.new(@frame, 'highlightthickness'=>@h_l_thick, @v_scroll = TkYScrollbar.new(@frame, 'highlightthickness'=>@h_l_thick,
'borderwidth'=>@scrbar_border, 'borderwidth'=>@scrbar_border,
'width'=>@scrbar_width) 'width'=>@scrbar_width)
@ -197,10 +197,10 @@ class TkMultiColumnList < TkText
@f_lbox.height lbox_height @f_lbox.height lbox_height
@f_hscr.height hscr_height @f_hscr.height hscr_height
# set control procedure for virtical scroll # set control procedure for vertical scroll
@v_scroll.assign(*@lbox_list) @v_scroll.assign(*@lbox_list)
# set control procedure for horizoncal scroll # set control procedure for horizontal scroll
@h_scroll.assign(@c_title, @c_lbox, @c_hscr) @h_scroll.assign(@c_title, @c_lbox, @c_hscr)
# binding for listboxes # binding for listboxes

View file

@ -21,7 +21,7 @@ class TkMultiListbox < TkListbox
@width_total = 0 @width_total = 0
title_info.each{|title, width| @width_total += width.to_f} title_info.each{|title, width| @width_total += width.to_f}
# virtical scrollbar # vertical scrollbar
@v_scroll = TkScrollbar.new(@frame, 'orient'=>'vertical') @v_scroll = TkScrollbar.new(@frame, 'orient'=>'vertical')
# init arrays # init arrays
@ -42,7 +42,7 @@ class TkMultiListbox < TkListbox
'height'=>@v_scroll.cget('width') + 'height'=>@v_scroll.cget('width') +
2 * @v_scroll.cget('borderwidth')) 2 * @v_scroll.cget('borderwidth'))
# dummy label to keep the hight of title space # dummy label to keep the height of title space
TkLabel.new(@f_title, 'text'=>' ').pack TkLabel.new(@f_title, 'text'=>' ').pack
# create each listbox # create each listbox
@ -104,7 +104,7 @@ class TkMultiListbox < TkListbox
tab.bind('B1-Motion', proc{|x, idx| resize(x, idx.to_i)}, "%X #{idx}") tab.bind('B1-Motion', proc{|x, idx| resize(x, idx.to_i)}, "%X #{idx}")
} }
# set control procedure for virtical scroll # set control procedure for vertical scroll
@lbox_list.each{|lbox| @lbox_list.each{|lbox|
lbox.yscrollcommand proc{|first, last| lbox.yscrollcommand proc{|first, last|
@v_scroll.set first, last @v_scroll.set first, last

View file

@ -53,7 +53,7 @@ class TkMultiListFrame < TkListbox
# init status # init status
@mode = :title @mode = :title
# virtical scrollbar # vertical scrollbar
=begin =begin
@v_scroll = TkScrollbar.new(@frame, 'highlightthickness'=>@h_l_thick, @v_scroll = TkScrollbar.new(@frame, 'highlightthickness'=>@h_l_thick,
'borderwidth'=>@scrbar_border, 'borderwidth'=>@scrbar_border,
@ -185,7 +185,7 @@ class TkMultiListFrame < TkListbox
@f_lbox.height lbox_height @f_lbox.height lbox_height
@f_hscr.height hscr_height @f_hscr.height hscr_height
# set control procedure for virtical scroll # set control procedure for vertical scroll
=begin =begin
@lbox_list.each{|lbox| @lbox_list.each{|lbox|
lbox.yscrollcommand proc{|first, last| lbox.yscrollcommand proc{|first, last|
@ -196,7 +196,7 @@ class TkMultiListFrame < TkListbox
=end =end
@v_scroll.assign(*@lbox_list) @v_scroll.assign(*@lbox_list)
# set control procedure for horizoncal scroll # set control procedure for horizontal scroll
=begin =begin
@c_title.xscrollcommand proc{|first, last| @c_title.xscrollcommand proc{|first, last|
@h_scroll.set first, last @h_scroll.set first, last

View file

@ -76,7 +76,7 @@ module Tk::ScrollbarComposite
@component.xscrollbar(@h_scroll) @component.xscrollbar(@h_scroll)
@component.yscrollbar(@v_scroll) @component.yscrollbar(@v_scroll)
# allignment # alignment
TkGrid.rowconfigure(@frame, 0, 'weight'=>1, 'minsize'=>0) TkGrid.rowconfigure(@frame, 0, 'weight'=>1, 'minsize'=>0)
TkGrid.columnconfigure(@frame, 0, 'weight'=>1, 'minsize'=>0) TkGrid.columnconfigure(@frame, 0, 'weight'=>1, 'minsize'=>0)
@component.grid('row'=>0, 'column'=>0, 'sticky'=>'news') @component.grid('row'=>0, 'column'=>0, 'sticky'=>'news')
@ -156,7 +156,7 @@ class TkTextFrame < TkText
:textrelief :textrelief
) )
# return the created componet # return the created component
@text @text
end end
private :create_component private :create_component

View file

@ -8,7 +8,7 @@
# So, for example, TkTextIO#getc returns a character, TkTextIO#pos # So, for example, TkTextIO#getc returns a character, TkTextIO#pos
# means the character position, TkTextIO#read(size) counts by # means the character position, TkTextIO#read(size) counts by
# characters, and so on. # characters, and so on.
# Of course, it is available to make TkTextIO class to suuport # Of course, it is available to make TkTextIO class to support
# 'byte' access. However, it may break multi-byte characters. # 'byte' access. However, it may break multi-byte characters.
# and then, displayed string on the text widget may be garbled. # and then, displayed string on the text widget may be garbled.
# I think that it is not good on the supposed situation of using # I think that it is not good on the supposed situation of using

View file

@ -121,7 +121,7 @@ Tk::Tile.set_theme(OPTS[:theme]) if OPTS[:theme]
########################################################################## ##########################################################################
# replace $0 and $RPAGRAM_NAME # replace $0 and $PROGRAM_NAME
########################################################################## ##########################################################################
# When the expand_path of the target script is long, ruby sometimes # When the expand_path of the target script is long, ruby sometimes
# fails to set the path to $0 (the path string is trimmed). # fails to set the path to $0 (the path string is trimmed).

View file

@ -3814,7 +3814,7 @@ ip_RubyExitCommand(clientData, interp, argc, argv)
return TCL_RETURN; return TCL_RETURN;
default: default:
/* arguemnt error */ /* argument error */
Tcl_AppendResult(interp, Tcl_AppendResult(interp,
"wrong number of arguments: should be \"", "wrong number of arguments: should be \"",
cmd, " ?returnCode?\"", (char *)NULL); cmd, " ?returnCode?\"", (char *)NULL);