16 lines
454 B
Smalltalk
16 lines
454 B
Smalltalk
Extension { #name : #OrderedDictionary }
|
|
|
|
{ #category : #'*TiddlyWiki' }
|
|
OrderedDictionary >> asTiddler [
|
|
| tiddlerFields response |
|
|
response := Tiddler new.
|
|
tiddlerFields := response class slotNames copyWithoutAll: #('wiki' 'customFields').
|
|
self keysAndValuesDo: [ :key :value |
|
|
(tiddlerFields includes: key)
|
|
ifFalse: [
|
|
response customFields at: key put: value ]
|
|
ifTrue: [ response writeSlotNamed: key value: value ]
|
|
].
|
|
^ response
|
|
]
|