which reminds me, we should have a dumb default serializer method on Object: Object new serializeTo: 'aFile' asFileReference cause I never figure out which Fuel class to use for serialization :) On 2013-01-23, at 08:54, Sven Van Caekenberghe <sven@stfx.eu> wrote:
On 23 Jan 2013, at 05:24, J. P. L. MartÃn <arguser@gmail.com> wrote:
Say I have an OrderedCollection which I want to save into a file and then recover from that file when I restart the application. How should I proceed? So far I've been doing a mess, saving the OrderedCollection on a file asString, since I'm then unable to recover it asOrderedCollection.
Another problem that I have is at the moment of showing items from that OrderedCollection on a MultiColumnListMorph where I get unwanted info from the printOn:
a Prestamo fechaPrevistaDevolucion: 20 January 2013 fechaPrestamo: 17 January 2013 id: ''1'' idSocio: ''2'' idEjemplarl: ''1'' fechaDevolucion: '''''
Where I want:
20 January 2013 17 January 2013 1 2 1 ''
Here you can find the source code: https://github.com/arguser/Paradigmas-Final
Fuel is a fast binary serializer that can store almost anything.
If the collection is holding clean domain level objects, you could also use XML, JSON or STON. These give you human readable textual representations.
Sven
Search for XML Support NeoJSON STON
-- Sven Van Caekenberghe http://stfx.eu Smalltalk is the Red Pill