Tk Source Code

View Ticket
Login
Ticket UUID: 220830
Title: add ability to define an event "filter"
Type: RFE Version: None
Submitter: welch Created on: 2000-11-01 01:29:31
Subsystem: 69. Events Assigned To: hobbs
Priority: 5 Medium Severity:
Status: Open Last Modified: 2003-11-13 07:08:57
Resolution: None Closed By:
    Closed on:
Description:
OriginalBugID: 1304 RFE
Version: 8.1b1
SubmitDate: '1999-02-25'
LastModified: '1999-12-14'
Severity: LOW
Status: UnAssn
Submitter: pat
ChangedBy: hobbs
OS: Windows NT
OSVersion: 4
Machine: X86


Name:
Bryan Oakley

DesiredBehavior:
it would be nice to define an event filter -- a script that all events
for a particular bindtag go through before going through the normal
event handling process.

This could be used, for example, to implement an event record and
playback tool. Once could set an event filter on ".", then use the "%e"
substitution I recommended in another feature request to store the event
information for later retrieval.

If it were a true filter where aspects of the event could be changed, it
could be useful to provide input validation or masking, or possibly even
to redirect an event to a particular window (by modifying the %W value).
It could also be used to implement a "busy" state, where all events are
rejected until the busy state is clear. This can be done now, but not
without a lot of work.  

Finally, it could be used to drive additional copies of an application.
For example, one could fire up N instances of a program, all controlled
by a master program. Any events that pass through the filter could be
sent to the other applications using a combination of send and event
generate. This could be useful for remote debugging, for example. Or in
teaching situations where the teacher can demonstrate a program and have
his/her actions duplicated on the student's machines.