[BUG]Integer class(Object)>>error:

Frank Shearar frank.shearar at rnid.org.uk
Thu Apr 1 13:58:45 UTC 2004


> >>> "Alexander at Lazarevic.de" 04/01/04 09:48 >>>
>
> With the new updates I opened a browser, went to class Preferences and
> got an "At least
> one digit expected here" error immediately.

Update 5844 (5844ANSICompatibility) introduces support for reading in float
literals. These take the form <mantissa><exponentLetter><exponent>.
exponentLetter can be $e, $d or $q.

Therefore, when you view Preference's class comment RunArray>>scanFrom: gets
given '(220 29 81 35 812)f1,f1dPreferences
openFactoredPanel;;,f1,f1dPreferences giveHelpWithPreferences;;,f1'.

The substring 'f1dPreferences' thus gets interpreted as a float literal and
Number class tries to interpret the substring 'Preferences' as a sequence of
digits.

The same problem can be duplicated by doit-ing

RunArray scanFrom: (ReadStream on: '()f1da')

Of course, the $d is supposed to represent a TextDoIt.

I suppose the solution is to change RunArray>>scanFrom: to
Integer>>readFrom? Otherwise we'd have to not use $d in RunArray, which
means we'd have to change the .changes file, wouldn't we?

I've attached a changeset which alters RunArray>>scanFrom: to use
Integer>>readFrom: instead of Number>>readFrom:. The three RunArray thingies
that the changeset affects are TextDoIt ($d), TextAlignment ($a) and
TextFontReference ($F).

The changeset does require someone more knowledgeable than I to review it -
I know next to nothing about how RunArray works.

frank
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RunArrayScanFrom-fbs.cs
Type: application/octet-stream
Size: 2935 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20040401/b631a490/RunArrayScanFrom-fbs.obj


More information about the Squeak-dev mailing list