[Seaside-dev] more non-portable constructs

Paolo Bonzini bonzini at gnu.org
Tue Feb 12 13:38:51 UTC 2008


Two changes I propose:

1) in WALocale class >> parseCountryString, rewrite it like this:

     | string lines |
     iso2Countries := Dictionary new.
     string := self countryList.
     lines := string findTokens: Character cr.
         lines allButFirst collect:
                 [:each |
                 | parts |
                 parts := each findTokens: $;.
                 parts size >= 2 ifTrue: [iso2Countries at: parts second 
put: parts first]]
     ]

with two changes: a) Using #findTokens: instead of #subStrings: since 
that's what is already in SeasidePlatformSupport; b) Testing that the 
result has two items because in my source the second line of the 
#countryList is blank.

2) in WAEncoder class >> initializeBMP, always pass a parameter to the 
exception handler (currently there is "... on: Error do: [255]").


Then, here's a small and probably incomplete list of missing 
WAPlatformTest testcases:

1) SequenceableCollection>>#atRandom
    SequenceableCollection>>#atRandom:
    Integer>>#atRandom
2) Character>>#to: (including running #collect: on the result, because
    the platform support class should *not* return a String!).
3) Integer>>#printStringBase:
4) String>>#padded:to:with:

Paolo


More information about the seaside-dev mailing list