I serialized aSortedCollection with a sort block comparing via a #startTime message on the domain objects. When I attempted to materialize it, I got an error that my domain objects don't understand #<=. It seems that the elements are being loaded before the sort block. ----- Cheers, Sean -- Sent from: http://forum.world.st/Pharo-Smalltalk-Developers-f1294837.html
STON cannot serialise block closures. You would have to get creative to make this work. For SortedCollection, it would only work without a sort block. STON fromString: (STON toString: #(1 2 3) asSortedCollection).
On 9 Sep 2017, at 04:58, Sean P. DeNigris <sean@clipperadams.com> wrote:
I serialized aSortedCollection with a sort block comparing via a #startTime message on the domain objects. When I attempted to materialize it, I got an error that my domain objects don't understand #<=. It seems that the elements are being loaded before the sort block.
----- Cheers, Sean -- Sent from: http://forum.world.st/Pharo-Smalltalk-Developers-f1294837.html
Sven Van Caekenberghe-2 wrote
STON cannot serialise block closures.
Oops, sorry. I see that now: https://github.com/svenvc/ston/blob/master/ston-paper.md#limitations I wonder, in this case, there are no references in the block to any objects except its own arguments. Would it be possible to support that limited case? (I don't need it for myself, just pondering out loud) ----- Cheers, Sean -- Sent from: http://forum.world.st/Pharo-Smalltalk-Developers-f1294837.html
On 9 Sep 2017, at 15:45, Sean P. DeNigris <sean@clipperadams.com> wrote:
Sven Van Caekenberghe-2 wrote
STON cannot serialise block closures.
Oops, sorry. I see that now: https://github.com/svenvc/ston/blob/master/ston-paper.md#limitations
I wonder, in this case, there are no references in the block to any objects except its own arguments. Would it be possible to support that limited case? (I don't need it for myself, just pondering out loud)
Yeah, I was thinking along the same lines, especially clean block might be doable. I'll mark this as todo and think about it a bit.
participants (2)
-
Sean P. DeNigris -
Sven Van Caekenberghe