Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
valuesportinglog [2022/01/31 19:05] christian [FileIn 4] |
valuesportinglog [2022/02/01 13:31] christian [FileIn 7 - Tests] |
||
---|---|---|---|
Line 180: | Line 180: | ||
FileOut from VW, then fileIn into a fresh Squeak image. | FileOut from VW, then fileIn into a fresh Squeak image. | ||
- | Loads about 97% until it hits the error that Timestamp is not defined. | + | Loads without errors or warnings!. |
+ | |||
+ | < | ||
+ | First milestone: <span style=" | ||
+ | </ | ||
+ | |||
+ | Next step: fileIn | ||
+ | |||
+ | ===== FileIn 6 - Tests ===== | ||
+ | |||
+ | Added Squeak class method ''# | ||
+ | |||
+ | <code Smalltalk> | ||
+ | self | ||
+ | write: (' | ||
+ | pundles: (Array with: (Store.Registry packageNamed: | ||
+ | package: #' | ||
+ | prerequisites: | ||
+ | packageChanges: | ||
+ | </ | ||
+ | |||
+ | with the standard transformation for Value classes: | ||
+ | |||
+ | <code Smalltalk> | ||
+ | ValuesTestingTransform | ||
+ | ^PackageChange hierarchyChanges: | ||
+ | classReference: | ||
+ | classChanges: | ||
+ | </ | ||
+ | |||
+ | FileOut from VW with: | ||
+ | |||
+ | <code Smalltalk> | ||
+ | |||
+ | then fileIn into a Squeak image with Values loaded. | ||
+ | |||
+ | Loads without errors. | ||
The Transcript shows: | The Transcript shows: | ||
<code Smalltalk> | <code Smalltalk> | ||
- | UndefinedObject>>DoIt (Timestamp | + | ValuemapTests>>testIndexedAccess |
- | UndefinedObject>>DoIt (Timestamp | + | ValuemapTests>>testIndexedAccess |
- | UndefinedObject>>DoIt (Timestamp | + | ValuemapTests>>testIndexedAccess |
- | UndefinedObject>>DoIt (Timestamp | + | ValuemapTests>>testIndexedAccess |
- | UndefinedObject>>DoIt (Timestamp | + | ValuemapTests>>testKeyedAccess |
+ | ValuemapTests>> | ||
+ | ValuemapTests>> | ||
+ | ValuemapTests>> | ||
+ | ValuemapTests>> | ||
</ | </ | ||
- | We do the same trick as in FileIn x and set DateAndTime as superclass of Timestamp. The new Transformation is: | + | The VW error classes are not known in Squeak. We define a rewrite of the three test methods: |
<code Smalltalk> | <code Smalltalk> | ||
- | ValuesTransform | + | ValuesTestingTransform |
^PackageChange | ^PackageChange | ||
- | unusedClasses: | ||
- | newSuperclasses: | ||
- | with: # | ||
- | with: # | ||
hierarchyChanges: | hierarchyChanges: | ||
classReference: | classReference: | ||
classChanges: | classChanges: | ||
- | localChanges: | + | localChanges: |
+ | classReference: | ||
+ | instanceChanges: | ||
+ | add: (Rewrite method: # | ||
+ | add: (Rewrite method: # | ||
+ | add: (Rewrite method: # | ||
+ | yourself))) | ||
</ | </ | ||
- | Published as **[Squeak Fileout PDFtalk] (3.0.0.6,chaider)** with the updated transformation. | + | The rule ''# |
+ | |||
+ | <code Smalltalk> | ||
+ | replaceSqueakErrorClasses | ||
+ | ^(self new) | ||
+ | replace: SubscriptOutOfBoundsError name asString with: #Error asString; | ||
+ | replace: NonIntegerIndexError name asString with: #Error asString; | ||
+ | replace: NotFoundError name asString with: #NotFound asString; | ||
+ | yourself | ||
+ | </ | ||
+ | |||
+ | Published as **[Squeak Fileout PDFtalk] (3.0.0.7,chaider)** with the updated transformation. | ||
+ | ===== FileIn 7 - Tests ===== | ||
+ | |||
+ | FileOut [Values] and [Values Testing], then fileIn into a fresh Squeak image. | ||
+ | |||
+ | Loads without errors or warnings. | ||
+ | |||
+ | Published as **[Squeak Fileout PDFtalk] (3.0.0.8, |