SISS
Last updated at 2:44 pm UTC on 29 September 2016
SISS is a serialisation format. It is similar to SIXX but uses S-expressions.[1]
It is used in the Etoys image to make quick guide projects [2] persistent.
According to Yoshiki Ohshima (Email on Squeaklist, Wed, Aug 31, 2016 at 6:36 PM) the difference to SIXX is minimal.
The classes are in three categories
SISS-Core
('SISS-Core' SISSDictionaryForGuideBook SISSDictionaryForMorphCopying
SISSDictionaryForReading SISSDictionaryForScanning SISSProxy)
SISS-Meta
('SISS-Meta' MSExpParser MSExpTokenizer SExpAttributes SExpElement)
Etoys-Squeakland-SISS-Serialization
('Etoys-Squeakland-SISS-Serialization' ParseNodeBuilder)
SISS code example
To use SISS classes need to implement a method
sissExportSpecification
For example for Workspace it is
sissExportSpecification
^ #(('contents' #sissGetContents)
('bindings' #bindings)
('acceptDroppedMorphs' #acceptsDroppingMorphForReference)
)
And a method
sissWriteValue
Morph >> sissWriteValue
sissWriteValue
self prepareToBeSaved.
or
Object>>sissWriteValue
sissWriteValue
"Override if you wish"
^self
PasteUpMorph>>sissWriteValue
sissWriteValue
"Override if you wish"
| new |
self prepareToBeSaved.
new _ self clone.
new privateSubmorphs: (submorphs reject: [:e |
(e isKindOf: SolidSugarSuppliesTab)
or: [(e isKindOf: Viewer)
or: [(e isKindOf: SugarNavTab)
or: [((e isKindOf: SystemWindow) and: [(e model isKindOf: Workspace) not])
or: [(e isMemberOf: FlapTab) and: [e isGlobalFlap]]]]]]).
new instVarNamed: 'presenter' put: nil.
new instVarNamed: 'worldState' put: nil.
new privateExtension: self extension copy.
new extension removeOtherProperties.
self extension otherProperties keysDo: [:sym |
(#(commandKeySelectors lastKeystroke locked) includes: sym) ifFalse: [
new setProperty: sym toValue: (self extension valueOfProperty: sym)
].
].
^ new.
[1]
https://en.wikipedia.org/wiki/S-expression
http://rosettacode.org/wiki/S-Expressions
[2]
QuickGuides are stored in the Etoys all-in-one-package in Contents/Resources/QuickGuides/
or by language in Contents/Resources/locale//QuickGuides/
(see guidePath)