[Seaside] Magritte MANumberDescription and ScaledDecimal numbers

Philippe Marschall philippe.marschall at gmail.com
Thu Jul 26 19:26:23 UTC 2007


2007/7/26, GMailAccount <tlwilkinsonyyc at gmail.com>:
> I'm having a little trouble with MANumberDescription, because it keeps
> internalizing the numbers as ScaledDecimals, and for whatever reason,
> ScaledDecimals print out like this:
>
> 0.05s2  0.0s1   15s0
> 0.05s2  0.07s2  44.0s1
>
> etc.
>
> This is really going to boggle the users minds, and I know I'll get
> asked
> weekly: 'What are the S's for on those numbers?'.

Standard Smalltalk scaled decimal syntax.

> So ideally, I'd like MANumberDescription to treat the numbers as Floats.

No, please not.

> Alternatively can the rendering methods for MANumberDescription can be
> overridden, to preform the necessary display conversion
> automatically?

Sure, write your own string readers and writers. But you might also
want to create your own ScaledDecimal description while you're at it.

> Or is it
> best to directly modify the ScaledDecimal class to print the way I'd
> like?

 That's pretty much the worst option, this is begging for problems.

Philippe


More information about the Seaside mailing list