Skip to content
This repository has been archived by the owner on Dec 21, 2022. It is now read-only.

Tasty errors on quick-save when given object expression #120

Open
genworks opened this issue May 27, 2013 · 0 comments
Open

Tasty errors on quick-save when given object expression #120

genworks opened this issue May 27, 2013 · 0 comments
Assignees

Comments

@genworks
Copy link
Owner

When you give an Object Expression (instead of package::class) to browse in Tasty, the automatic quick-save which happens with every Ajax call throws an error:

 got the error #<some-package::some-type @ #x29012eb2> appears to be a GDL
              object from a different object hierarchy from the current
object #<tasty:assembly @ #x2902d21a>. GDL currently does not support
              writing out and reading back in GDL objects from
a separate object hierarchy.

This error will not happen if you instantiate the object via tasty by specifying a package::class.

But Tasty and/or the quick-save and readable-expression functions have to be fixed so as not to incur this error (it is because the root-object is indeed from a different tree hierarchy when you specify a pre-instantiated object to tasty, so this requires a fundamental re-working of the way the readable-expression works for this case).

In the meantime the following patch will turn this into a Warning instead of an Error:

(in-package :gwl)

(defun quick-save (self &key (snap-folder (glisp:snap-folder)))
  (let ((snap-file 
     (merge-pathnames 
      (make-pathname :name (format nil "~a" (the instance-id))
             :type "snap") snap-folder)))
    (with-error-handling ()
      (the (write-snapshot :filename snap-file)))))
@ghost ghost assigned genworks May 27, 2013
@genworks genworks added the $ label Jan 30, 2015
@genworks genworks removed the $ label Mar 26, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant