Is there another function apart form propagateEvent to send events to the "standard" event
For example in these situations:
1) I have some TexEntry widgets on a frame. If the user press Tab, focus moves to next TexEntry.
Now, I want to handle that event this way: if user press Tab, the program does something (for
example, check if the text entered is a number) and then pass the event to the "standard" handler
to move the focus to the next widget. I could change the focus by hand, but this is cumbersome, I
don't want to manage a list of widgets, use a Var to store where focus is, etc., this is
2) I need to autocomplete text on a TextEntry. So, if I use "on keyboard" to detect when user
types next letter, and thus I can do something with that letter, the "standard" event handler
doesn't see the event, and thus the letter is not printed on the TextEntry. I have to do something
like "set text :~ (++ <letter>)". The problem is that these events only detect keypresses, not
text. If user press "A" I only see a "shift key press" followed by "a key press". I have to
translate key press sequences to text, which is a pain for languages with accented characters, and
impossible if user press Ctrl-v and pastes some text. If I could do something like:
on keyboard ::= \w -> standardHandler >> get w text >>= myFunction
this problem dissapears.
Is there a way to do this, or something with the same result?
Antonio Regidor Garcia
Sé un Mejor Amante del Cine
¿Quieres saber cómo? ¡Deja que otras personas te ayuden!
Get latest updates about Open Source Projects, Conferences and News.