diff options
Diffstat (limited to 'ext/tk/sample/demos-en/widget')
-rw-r--r-- | ext/tk/sample/demos-en/widget | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/tk/sample/demos-en/widget b/ext/tk/sample/demos-en/widget index b8073a05d..43880e6d2 100644 --- a/ext/tk/sample/demos-en/widget +++ b/ext/tk/sample/demos-en/widget @@ -517,10 +517,10 @@ end # txt - Name of text widget # index - The index of the character that the user clicked on. -def invoke (txt, index) - tag = txt.tag_names(index).find{|t| t.kind_of?(String) && t =~ /^demo-/} +def invoke (txt, idx) + tag = txt.tag_names(idx).find{|t| t.kind_of?(String) && t =~ /^demo-/} return unless tag - cursor = txt.cget('cursor') + current_cursor = txt.cget('cursor') txt.cursor('watch') Tk.update # eval `cat #{tag[5..-1]}.rb` @@ -528,9 +528,9 @@ def invoke (txt, index) eval IO.readlines("#{[$demo_dir, tag[5..-1]].join(File::Separator)}.rb").join Tk.update # txt.cursor('xterm') - txt.cursor(cursor) + txt.cursor(current_cursor) - $tag_visited.add("#{index} linestart +1 chars", "#{index} lineend +1 chars") + $tag_visited.add("#{idx} linestart +1 chars", "#{idx} lineend +1 chars") end # showStatus -- @@ -791,7 +791,7 @@ end # def aboutBox Tk.messageBox('icon'=>'info', 'type'=>'ok', 'title'=>'About Widget Demo', - 'message'=>"Ruby/Tk widget demonstration Ver.1.5.2-en\n\n" + + 'message'=>"Ruby/Tk widget demonstration Ver.1.5.3-en\n\n" + "based on demos of Tk8.1 -- 8.5 " + "( Copyright:: " + "(c) 1996-1997 Sun Microsystems, Inc. / " + |