Skip to content

Commit

Permalink
Merge pull request #21 from dassi/pharo110
Browse files Browse the repository at this point in the history
Compatibility for Pharo 11 and 12
  • Loading branch information
mumez authored Nov 6, 2024
2 parents 6df91d9 + acd8712 commit 0ad4105
Show file tree
Hide file tree
Showing 69 changed files with 267 additions and 23 deletions.
5 changes: 3 additions & 2 deletions repository/BaselineOfSIXX.package/.filetree
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"noMethodMetaData" : true,
"separateMethodMetaAndSource" : false,
"useCypressPropertiesFile" : true }
"noMethodMetaData" : true,
"useCypressPropertiesFile" : true
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ baseline: spec
self xmlParser: spec.
spec package: 'SIXX-Pharo'.
spec package: 'SIXX-ParserAdapter' with: [spec requires: 'XMLParser'].
spec package: 'SIXX-InOut-Common'.
].
spec for: #(#'pharo1.x' #'pharo2.x' #'pharo3.x' #'pharo4.x' #'pharo5.x' #'pharo6.x' #'pharo7.x' #'pharo8.x' #'pharo9.x' #'pharo10.x') do:[
spec package: 'SIXX-InOut-Common' with: [spec includes: 'SIXX-InOut-Pharo'].
spec package: 'SIXX-InOut-Pharo' with: [spec requires: #('SIXX-Pharo' 'SIXX-InOut-Common')].
].
spec for: #(#'pharo11.x' #'pharo12.x') do:[
spec package: 'SIXX-InOut-Common' with: [spec includes: 'SIXX-InOut-Pharo110'].
spec package: 'SIXX-InOut-Pharo110' with: [spec requires: #('SIXX-Pharo' 'SIXX-InOut-Common')].
].

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
{
"category" : "BaselineOfSIXX",
"classinstvars" : [
],
"classvars" : [
],
"commentStamp" : "",
"instvars" : [
],
"name" : "BaselineOfSIXX",
"pools" : [
],
"super" : "BaselineOf",
"type" : "normal" }
"category" : "BaselineOfSIXX",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [ ],
"name" : "BaselineOfSIXX",
"type" : "normal"
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SystemOrganization addCategory: #BaselineOfSIXX!
self packageOrganizer ensurePackage: #BaselineOfSIXX withTags: #()!
1 change: 0 additions & 1 deletion repository/BaselineOfSIXX.package/monticello.meta/version

This file was deleted.

3 changes: 1 addition & 2 deletions repository/BaselineOfSIXX.package/properties.json
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
{
}
{ }
5 changes: 5 additions & 0 deletions repository/SIXX-InOut-Pharo110.package/.filetree
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"separateMethodMetaAndSource" : false,
"noMethodMetaData" : true,
"useCypressPropertiesFile" : true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
*SIXX-InOut-Pharo110-instance creation
createInstanceOf: aClass withSixxElement: sixxElement

"For old format"
| stream |
(SixxXmlUtil hasSubElementsFrom: sixxElement ) ifTrue: [
^super createInstanceOf: aClass withSixxElement: sixxElement
].

stream := ReadStream on: (SixxXmlUtil characterDataFrom: sixxElement).
^self readSixxContentStringFrom: stream
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
*SIXX-InOut-Pharo110-instance creation
readSixxContentStringFrom: aStream
| space familyName size emphasisCode |
space := Character space.
familyName := aStream upTo: space.
size := (aStream upTo: space) asInteger.
emphasisCode := (aStream upTo: space) asInteger.
^self sixxFamilyName: familyName size: size emphasized: emphasisCode.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*SIXX-InOut-Pharo110-instance creation
sixxFamilyName: familyName size: size emphasized: emphasisCode
^self familyName: familyName size: size emphasized: emphasisCode
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*SIXX-InOut-Pharo110-printing
sixxContentOn: aStream indent: level context: dictionary
aStream nextPutAll: self sixxContentString
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*SIXX-InOut-Pharo110-printing
sixxContentString
"Squeak Specific"
^self fontNameWithPointSize, ' ', self emphasis asString
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name" : "AbstractFont"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
*SIXX-InOut-Pharo110-printing
sixxContentOn: aStream indent: level context: dictionary
aStream
nextPutAll: '(' , self class name;
nextPutAll: ' r: '; print: (self red roundTo: 0.001);
nextPutAll: ' g: '; print: (self green roundTo: 0.001);
nextPutAll: ' b: '; print: (self blue roundTo: 0.001);
nextPutAll: ')'.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name" : "Color"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*SIXX-InOut-Pharo110
createInstanceOf: aClass withSixxElement: sixxElement
SixxInvalidDeserialization signal: aClass name element: sixxElement.
^nil
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*SIXX-InOut-Pharo110
sixxContentOn: aStream indent: level context: dictionary
SixxInvalidSerialization signal: self class name context: dictionary.
SixxXmlUtil writeXmlText: self printString on: aStream
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name" : "CompiledCode"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*SIXX-InOut-Pharo110-instance creation
createInstanceOf: aClass withSixxElement: sixxElement
SixxInvalidDeserialization signal: aClass name element: sixxElement.
^nil
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*SIXX-InOut-Pharo110-printing
sixxContentOn: aStream indent: level context: dictionary
SixxInvalidSerialization signal: self class name context: dictionary.
SixxXmlUtil writeXmlText: self printString on: aStream
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name" : "Context"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*SIXX-InOut-Pharo110-private
readSixxContentStringFrom: aStream
"Squeak specific"
^ self readFrom: aStream
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*SIXX-InOut-Pharo110-private
sixxContentString
"Squeak Specific"
^self printString
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name" : "Date"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*SIXX-InOut-Pharo110-instance creation
createInstanceOf: aClass withSixxElement: sixxElement

"For old format"
(SixxXmlUtil hasSubElementsFrom: sixxElement) ifTrue: [
^super createInstanceOf: aClass withSixxElement: sixxElement
].

^ self readSixxContentStringFrom: (ReadStream on: (SixxXmlUtil characterDataFrom: sixxElement))
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*SIXX-InOut-Pharo110-private
readSixxContentStringFrom: aStream
"Squeak specific"
^ self readFrom: aStream
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*SIXX-InOut-Pharo110-printing
sixxContentOn: aStream indent: level context: dictionary
aStream nextPutAll: self sixxContentString
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*SIXX-InOut-Pharo110-private
sixxContentString
"Squeak Specific"
^self printString
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*SIXX-InOut-Pharo110-private
sixxInstVarNamed: varName put: childInst
"For old format"
varName = 'jdn' ifTrue: [^ julianDayNumber := childInst ].
super sixxInstVarNamed: varName put: childInst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name" : "DateAndTime"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*SIXX-InOut-Pharo110-printing
emphasis
^0
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name" : "FixedFaceFont"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*SIXX-InOut-Pharo110
createInstanceOf: aClass withSixxElement: sixxElement
| col |
col := Array readFrom: (ReadStream on: (SixxXmlUtil characterDataFrom: sixxElement)).
^ col asFloatArray
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*SIXX-InOut-Pharo110
sixxContentOn: aStream indent: level context: dictionary
aStream nextPutAll: '#( '.
self do:[:each | aStream nextPutAll: each printString; space].
aStream nextPutAll: ')'.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name" : "Float32Array"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*SIXX-InOut-Pharo110
digitLength
"For compatibility with other dialects"
^ self bytesCount
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name" : "Integer"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*SIXX-InOut-Pharo110-instance creation
createInstanceOf: aClass withSixxElement: sixxElement
| col |
col := Array readFrom: (ReadStream on: (SixxXmlUtil characterDataFrom: sixxElement)).
^ col asIntegerArray
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*SIXX-InOut-Pharo110-printing
sixxContentOn: aStream indent: level context: dictionary
aStream nextPutAll: '#( '.
self do:[:each | aStream nextPutAll: each printString; space].
aStream nextPutAll: ')'.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name" : "IntegerArray"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*SIXX-InOut-Pharo110-printing
sixxContentString
^ self printString
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name" : "Interval"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*SIXX-InOut-Pharo110-private
sixxMetaclassInstance
^ self soleInstance
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name" : "Metaclass"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*SIXX-InOut-Pharo110-private
readSixxContentStringFrom: aReadStream
^ Number readFrom: aReadStream
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name" : "Number"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*SIXX-InOut-Pharo110-instance creation
readSixxContentStringFrom: aReadStream
^ self readFrom: aReadStream
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name" : "Object"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*SIXX-InOut-Pharo110-instance creation
createInstanceOf: aClass withSixxElement: sixxElement
"squeak specific"

^aClass basicNew
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
*SIXX-InOut-Pharo110-printing
sixxContentOn: aStream indent: level context: dictionary
aStream cr.
self runs
sixxOn: aStream
name: 'runs'
indent: level + 1
context: dictionary.
self values
sixxOn: aStream
name: 'values'
indent: level + 1
context: dictionary.
aStream tab: level
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name" : "RunArray"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*SIXX-InOut-Pharo110-instance creation
createInstanceOf: aClass withSixxElement: sixxElement
| col |
col := Array readFrom: (ReadStream on: (SixxXmlUtil characterDataFrom: sixxElement)).
^self withAll: col
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*SIXX-InOut-Pharo110-printing
sixxContentOn: aStream indent: level context: dictionary
aStream nextPutAll: '#( '.
self do:[:each | aStream nextPutAll: each printString; space].
aStream nextPutAll: ')'.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name" : "ShortIntegerArray"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*SIXX-InOut-Pharo110-instance creation
sixxFamilyName: familyName size: size emphasized: emphasisCode
^self familyName: familyName pointSize: size emphasized: emphasisCode
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name" : "StrikeFont"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*SIXX-InOut-Pharo110-printing
sixxContentOn: aStream indent: level context: dictionary
self sixxChildrenContentsOn: aStream indent: level + 1 context: dictionary.
aStream tab: level.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name" : "Text"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*SIXX-InOut-Pharo110-private
readSixxContentStringFrom: aStream
"Squeak specific"
^ self readFrom: aStream
Loading

0 comments on commit 0ad4105

Please sign in to comment.