I'm running into problems trying to get validation working for entry
widgets. Working in Ruby I tried adding validation to Mark Rosemans's
demo
http://www.tkdocs.com/tutorial/firstexample.html#code with the
following additions.
$feet = TkVariable.new; $meters = TkVariable.new
f = Tk::Tile::Entry.new(content) {width 7; textvariable
$feet}.grid( :column => 2, :row => 1, :sticky => 'we' )
f.validate = 'focus'
f.validatecommand "%P".to_i>5
f.invalidcommand Tk::messageBox :message => 'Metres must be less
than 5.'
What results is as soon as the program just after the main window is
complete the invalidcommand message box pops up. Once it is dismissed
the main window appears complete but then an error message comes up -
invalid command name "0"
Help?