in reply to Generic Entry widget validation

Thanks zentara and spurperl, but I already know how to define callbacks and send arguments to them.

The problem is that the Tk::Entry validation callback defines 5 arguments: proposed value, characters being added or deleted, current value, index in the string, and the action type. I don't know how to send it *additional* arguments of my own.

I am also validating on 'focusout', not on 'key'. Once I have verified that the entry is ok, I want to save it into my object.

If I define a separate callback for each Tk::Entry on the GUI, I know which part of my object's hash to update.

My boss wants this finished "yesterday", so for now I'm going with separate callbacks. Voluminous and repetetive, yes, but it works. I will see if I can come up with a short code example to show my problem.

By the way, I tried validating on 'key' and discovered a different problem. If a value changes I want to enable the 'Save' item on my pulldown menu, and I couldn't get that to work.