unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Persisting GOOPS objects
@ 2013-01-18 10:25 Andrew Gaylard
  2013-01-20 20:15 ` Andy Wingo
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Gaylard @ 2013-01-18 10:25 UTC (permalink / raw)
  To: guile-user

[-- Attachment #1: Type: text/plain, Size: 1470 bytes --]

Hi,

I'm trying to persist a GOOPS object.

I've found oop/goops/save.scm, which defines save-object.
That looks like what I need.

However, I can't get it to work.  Below is an example of what I'm seeing.
I'm sure I'm doing something dumb here -- but what?

Many thanks for your help,
- Andrew

$ /usr/bin/guile
GNU Guile 2.0.5-deb+1-1
Copyright (C) 1995-2012 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guile-user)> (use-modules (oop goops))
scheme@(guile-user)> (use-modules (oop goops describe))
scheme@(guile-user)> (use-modules (oop goops save))
scheme@(guile-user)> (define-class <ag-complex> (<number>) r i)
scheme@(guile-user)> (define c (make <ag-complex>))
scheme@(guile-user)> (slot-set! c 'r 3)
scheme@(guile-user)> (slot-set! c 'i 4)
scheme@(guile-user)> (describe c)
#<<ag-complex> 91a35b0> is an instance of class <ag-complex>
Slots are:
     r = 3
     i = 4
scheme@(guile-user)> (define l '((c . c)))
scheme@(guile-user)> (assoc 'c l)
$1 = (c . c)
scheme@(guile-user)> (save-objects l (current-output-port))
(define c 'c)
ERROR: In procedure hashq-get-handle:
ERROR: In procedure hashq-get-handle: Handle access not permitted on weak
table

Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]>

[-- Attachment #2: Type: text/html, Size: 1913 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-01-25 18:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-18 10:25 Persisting GOOPS objects Andrew Gaylard
2013-01-20 20:15 ` Andy Wingo
2013-01-21 12:48   ` Andrew Gaylard
2013-01-22  9:47     ` Andy Wingo
2013-01-23 13:46       ` Andrew Gaylard
2013-01-23 15:55         ` Andy Wingo
2013-01-25 18:06           ` Andrew Gaylard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).