snapshot file fails with variable sequences.
Created by: genworks
from Genworks Google Group:
'm trying to write/read a snapshot of a gendl object that contains a variable length sequence:
(define-object seq-obj () :input-slots ((name "not-set" :settable)))
(define-object seq-cont () :objects ((seq-objs :type 'seq-obj :sequence (:indices 'nil))) :functions ((add-obj (name) (let ((new-index (the seq-objs (number-of-elements)))) (the seq-objs (insert! new-index)) (the (seq-objs new-index) (set-slots! (list :name name)))))))
;; Test (defun test () (let ((myseqcont (make-object 'seq-cont))) (progn (the-object myseqcont (add-obj "First")) (the-object myseqcont (add-obj "Second")) (the-object myseqcont (add-obj "Third")) (the-object myseqcont (write-snapshot :filename "seq.lisp")))) (let ((readseqcont (read-snapshot :filename "seq.lisp"))) readseqcont))
Running the test function hangs in the debugger, and readseqcont is nil.