[squeak-dev] SISS serialisation format?

H. Hirzel hannes.hirzel at gmail.com
Wed Aug 31 06:21:31 UTC 2016


Hello

I understand that the SISS serialisation format has been used in the
Etoys 5.0 image to store quick guides. It is a plain text format.

What does SISS stand for?

Browsing the Etoys 5.0 image .....

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.



Form>>
sissWriteValue

	SISSDictionaryForScanning reduceFormDepth ifTrue: [
		^ (self asFormOfDepth: 8) hibernate.
	].
	^ self hibernate.





An example of the format

MSExpParser test1

        | str1 str2 str3 |
        str1 _ '(script :name "testscript1:" :type "Player" :player "12"
                (parameter :name "parameter" :type "Number" :position "1")
                (sequence
                        (loop :type "repeat"
                                (initial (literal :value "0"))
                                (increment (literal :value "1"))
                                (test (send :type "Number"
                (selector :selector "+")
                (send :type "Number"
                        (selector :getter "x")
                        (literal :type "Player" :value "self"))
                (literal :type "Number" :value "1")))
                                (sequence
                                        (assign :type "Number"
:updating "Incr:" :property "x"
                                                (literal :type
"Player" :value "4")
                                                (send :type "Number"
                                                        (selector :selector "+")
                                                        (literal :type
"Number" :value "244.0")
                                                        (literal :type
"Number" :value "1")))))))'.



I understand that the SISS format has been used successfully in the
Etoys image to store quick guide projects.

As far as Project saving is concerned it there a  difference between
Etoy Quick guide projects and regular Squeak Morphic projects?

Where can I find more information on the SISS format?

Regards

Hannes


More information about the Squeak-dev mailing list