Squeak 3.9: using SqNumberParser in Number>>readFrom:

Matthias Berth matthias.berth at googlemail.com
Sat Mar 24 16:33:33 UTC 2007


Hi,

I have found the discussion from last year:

  Fun with Number readFrom: What should we do ?
  http://lists.squeakfoundation.org/pipermail/squeak-dev/2006-April/103137.html

Basically, the problem was that Number>>readFrom: will produce 0 where
it should raise an error (e.g. when the input is letters only). There
is a fix at

  http://bugs.squeak.org/view.php?id=3512

i.e. a new class SqNumberParser does the right thing. The bug was
closed, but the problem still remains: while SqNumberParser is in the
Squeak 3.9 image,  Number>>readFrom is still the old method.

Do you have any pointers to the next step, i.e. changing the code in
classes Number, Integer (and wherever else)?

I have encountered this problem when using Magritte: when I use a
MANumberDescription for a field, there still is no check if the user
enters a number. Validation fails because the from field value is
interpreted using Number>>readFrom, so it produces 0 for inputs like
"xyz".

Cheers

Matthias



More information about the Squeak-dev mailing list