[BUG][FIX] Integer class(Object)>>error:
Boris Gaertner
Boris.Gaertner at gmx.net
Thu Apr 1 14:40:51 UTC 2004
<Alexander at Lazarevic.de> wrote:To: <squeak-dev at lists.squeakfoundation.org>
> With the new updates I opened a browser, went to class Preferences and
> got an "At least
> one digit expected here" error immediately.
>
> PS: Hey, no joke! Even if it is all fools day! :)
I can confirm this bug.
Here is a quick problem description and attached you
find a proposal for a fix.
To remove the bug, you can revert to an earlier version of
method
Number class> readRemainderOf:from:base:withSign:
The new version of this method, which came with change
set #5844 (ANSICompatibility) stumbles over the denotation
'1d' in ',f1dPref'
The reason is that in ANSI, the character $d can follow
a digit in denotations like: 1d2 (This is the denotation
of a Float in FloatD representation).
One can easily conclude that something is wrong with
the ANSI support for floats and I think the method
mentioned above can be improved,
*but* ...
for the bug you saw there is a better fix:
We read stylished text with method
RunArray class>>scanFrom:
Look at this method. To read a font number,
we use (Number readFrom: strm)
God in heaven! Number class>>readFrom:
is for floats and here we *know* that we have to read
integers. When you replace all the
(Number readFrom: strm) with (Integer readFrom: strm)
you will get the integers without running into problems
with ANSI floats. I think this is the correct fix and
ANSI support is a different topic.
Hope this helps,
Boris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scanStyleFix.1.cs
Type: application/octet-stream
Size: 2775 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20040401/1c8bae99/scanStyleFix.1.obj
More information about the Squeak-dev
mailing list
|