I researched out  <<Modified>> and did some tests, but it does not quite do what I need. It will detect if a change is made to the text field at the instant the change is made, and generate a  <<Modified>> virtual event, but if several changes are made to the same field, no other events are generated. For example if I type "123" in the text field, the event occurs at the "1", but I get no events at the "3". I need an event when the user is leaving the text field so I can make several things happen. The $widget->editModify() flag return the correct count of changes, but only one event. I tried  $widget->editModify(0); to clear the flag in the callback fuction, but it got into an infinite loop and crashed.

The problem with generateEvent() is that it would have to be attached to every way that the user could leave the grid of edit fields, which is the same problem with my kludge approach above. It would work, but way down the road if a change is made it could introduce a weird intermittent bug. I was hoping for a generic event that occurs on every widget on either exit (lose focus) or activate that I could bind to.

Maybe I do not have a problem? Does ButtonPress event cover every way out of my "grid of edits"? I know it covers buttons and menus. Is there any other "action" the user can do that would not be covered?

Thanks for the input. -Eugene


In reply to Re: Dealing with missing TK FocusOut event by NatureFocus
in thread Dealing with missing TK FocusOut event by NatureFocus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.