http://qs1969.pair.com?node_id=588424


in reply to Re: A graphical regular expression tester.
in thread A graphical regular expression tester.

Weird, your example tested fine until I clicked one of the switches, then got a similar error to you. However, I noticed the error didn't occur when clicking the checkbox for 'g'. The way subroutine call for this event is handled differently, so I swapped the following....
< $check_switch_i->bind('<Button-1>', \&button_run('now')); < $check_switch_m->bind('<Button-1>', \&button_run('now')); < $check_switch_s->bind('<Button-1>', \&button_run('now')); > $check_switch_i->bind('<Button-1>', sub { button_run('now') }); > $check_switch_m->bind('<Button-1>', sub { button_run('now') }); > $check_switch_s->bind('<Button-1>', sub { button_run('now') });
...and the bug has gone. I've no idea why though. Anyone?

Cheers, Rob

---
my name's not Keith, and I'm not reasonable.