Minutes:seconds.100ths in text field

Thanks for all assistance in the past. Here’s one for y’all.

I am trying to create a text field that emulates the Start Time/Stop Time entry fields in iTunes track Get Info window (in the Options tab). So far, I am using an “end editing” handler to verify input text (only accept 0-9, “:”, and “.”) and handle conversion from minutes:seconds.100ths to seconds.100ths.

However, ideally, it would be nice to be able to disallow bad characters (anything but those I mentioned) as_they_are_being_typed.

Another problem is that unless “end editing” actually is invoked (when the text field loses focus), the text field will never be verified. I suppose I could come up with a workaround for this. Even so, “end editing” can only verify text after the entire new text is entered, which is not very neat.

Other than hitting a “changed” handler on each text input, is any routine pre-built anywhere that can deal with minutes:seconds.100ths in a text field?

DatePicker is probably out of the question, BTW.

Any thoughts most appreciated.

Doug,

Did you find a solution to this?

Well, not really :stuck_out_tongue:

What I ended up doing was using a end editing handler that filtered only acceptable characters (0-9,“:”, and “.”). If any unacceptable characters had been entered, the text field will revert to “0:00” (or its original time-string). If the accepted characters can not be converted to minutes:seconds.thousandths, then, again, the text field will revert to “0:00” (or its original time-string).

I’d list the routines, but they are so app-specific and somewhat convoluted I’m afraid they wouldn’t make much sense. I’ll see if I can put something together to post here very soon.