Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

djberg96 (2603)

djberg96
  (email not shown publicly)

Journal of djberg96 (2603)

Tuesday December 31, 2002
11:50 AM

Tk flashback

[ #9693 ]
I just got a bug report for my Tk-PopEntry module. Seems there's a bug in the pattern validation scheme I set up. Even worse, it's really a design flaw that stemmed from a gui/data-entry philosophy that I had when I designed it.

You see, in my world, you only enter data in a left to right fashion. If you need to correct something, you use the backspace key and retype it. That's how it was designed because that's how the people at work used it. However, this guy discovered that if you click in the middle of the entry widget and start typing, you can violate the pattern rules, and get weird results to boot.

I thought the solution would be easy, but now I've tripped into a subtle difference between using an overloaded insert() method and a binding to <Key>; with the latter, I can't truly trap the old value before the user enters new data - it's already too late. I was simply making that part invisible to you, the naive end user.

Originally, I *did* use an overloaded insert() method, but got confused on some issues, and wanted to be consistent with Tk-LabPopEntry. Now it looks I'll have to revert back, but I'm not sure what I'll do for LabPopEntry. Maybe I can salvage things as they are - we'll see.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.