[plt-scheme] MrEd - pasteboard - save-file question

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sun Aug 12 09:16:16 EDT 2007

At Sat, 11 Aug 2007 22:07:55 +0200, Chris Laux wrote:
> Hi all,
> 
> I'm building a GUI application with MrEd that builds upon pasteboard
> with the graph-pasteboard-mixin. I can save and load just fine with a
> vanilla pasteboard, but not with my own classes. Unfortunately the
> documentation doesn't make much sense to me. Section 8.2.1 of the MrEd
> manual says:
> 
> > To convert a snip from an encoded representation (e.g., as bytes in a
> file) to a memory object, a decoding function must be provided for each
> type of snip
> 
> That would only make sense if I also provide an encoding function. How
> else do I know how to decode the data again? I found some code that
> implements a snip-class and defines a (read) method, but I don't quite
> know what I should be reading?

The encoding part is with the snip% instance, and the decoding part is
with the snip-class% instance (which creates a snip% in the process of
decoding).

The documentation for the snip% class is a little more clear on what
you have to do; see the second bulleted sequence there.

Meanwhile, I'll make a note to improve section 8.2.1.

Matthew



Posted on the users mailing list.