pos()
Instance Public methods
# move to Tk::Text::IndexModMethods module def +(mod)
return chars(mod) if mod.kind_of?(Numeric) mod = mod.to_s if mod =~ /^\s*[+-]?\d/ Tk::Text::IndexString.new(@id + ' + ' + mod) else Tk::Text::IndexString.new(@id + ' ' + mod) end
end
def -(mod)
return chars(-mod) if mod.kind_of?(Numeric) mod = mod.to_s if mod =~ /^\s*[+-]?\d/ Tk::Text::IndexString.new(@id + ' - ' + mod) elsif mod =~ /^\s*[-]\s+(\d.*)$/ Tk::Text::IndexString.new(@id + ' - -' + $1) else Tk::Text::IndexString.new(@id + ' ' + mod) end
end
Please login to continue.