It seems to me that Ruby/Tk does not support multi-events sequence binding ?
on TCL/TK:
You could do :
bind . abc {puts stdout M}
on Perl/Tk:
You could bind like:
<Key-a><Key-b><Key-c> or <a><b><c>
on Ruby/TK:
Tk.root.bind( ' ??? ' ) { puts 'M' }
What to write on ??? place?
I try :
'abc' ==> no works.
'Key-aKey-bKey-c' ==> no works. ( Ruby already take off the needs of < > )
I try also
Tk.root.bind('Key-a', 'Key-b', 'Key-c') { puts 'M' } ==> no works
So, does Ruby/Tk no support mutli-events sequence binding or
there is an other way to write it ?
Thanks.
OK. I found it. It must use array on Ruby/Tk. Something like:
Tk.root.bind( [ 'a', 'b', 'c' ]) { }
Now, I have other question ...
How it works on Ruby/Tk for virtual event ?
Example on TCL:
event add virt phys1 phys2 ... # adds a mapping physical events to
virtual event
event delete virt
event info
event info virt
Thank you.
Hi,
Message-ID: <91b08b8a04121606286c88c426@mail.gmail.com>
It seems to me that Ruby/Tk does not support multi-events sequence binding ?
No. Ruby/Tk supports event sequences.
Tcl/Tk | Ruby/Tk
···
From: email55555 email55555 <email55555@gmail.com>
Subject: [Tk] Multi-events sequence binding?
Date: Thu, 16 Dec 2004 23:28:55 +0900
----------------------+-------------------------------------------
<event> | 'event'
<event1><event2>... | ['event1', 'event2', ... ]
<<virtualevent>> | '<virtualevent>' or TkVirtualEvent class
on TCL/TK:
You could do :
bind . abc {puts stdout M}
on Perl/Tk:
You could bind like:
<Key-a><Key-b><Key-c> or <a><b><c>
on Ruby/TK:
['a', 'b', 'c'] or ['Key-a', 'Key-b', 'Key-c']
--
Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
Hi,
Message-ID: <91b08b8a041216073326f70ee9@mail.gmail.com>
How it works on Ruby/Tk for virtual event ?
Please use TkVirtualEvent class or TkVirtaulEvent::PreDefVirtEvent class.
event add virt phys1 phys2 ...
TkVirtualEvent#add
event delete virt
TkVirtualEvent#delete
event info
TkVirtualEvent.info
event info virt
TkVirtualEvent#info
···
From: email55555 email55555 <email55555@gmail.com>
Subject: Re: [Tk] Multi-events sequence binding?
Date: Fri, 17 Dec 2004 00:33:17 +0900
--
Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)