[plt-scheme] WXME Decoding Error

From: Eric Domeshek (domeshek at stottlerhenke.com)
Date: Fri Oct 10 17:42:36 EDT 2008

Hi Gang,

I've been messing around with the MrEd GUI and the associated 
application framework in an attempt to quickly prototype a simple 
Entity-Relationship diagram editor.  I've learned a lot about frames, 
pasteboards, snips, etc.--enough to get something basic running (with 
just a few display update bugs, about which, perhaps more some other 
time). 

But today I seem to have run into a bit of a brick wall in attempting to 
use the WXME encoding/decoding piece of the framework to save and reload 
my diagrams.  I've gotten a far as saving the data (writing a file with 
seven types of custom snips).  Unfortunately, I can't load the data back 
in, and the error message/trace is not helping me much.  Here's what 
comes up in the console window when I try to load one of these saved 
files by invoking the default File|Open command:

> insert-file in text%: error loading the file
>
>  === context ===
> C:\PLT\collects\mred\private\editor.ss:168:35
> C:\PLT\collects\mred\private\editor.ss:162:29
> C:\PLT\collects\framework\private\frame.ss:1007:2
> C:\PLT\collects\scheme\private\class-internal.ss:2592:2: 
> continue-make-object
> C:\PLT\collects\scheme\private\class-internal.ss:2592:2: 
> continue-make-object
> C:\PLT\collects\scheme\private\class-internal.ss:2592:2: 
> continue-make-object
> C:\PLT\collects\scheme\private\class-internal.ss:2514:4: make-object
> C:\PLT\collects\framework\private\handler.ss:73:3
> ...amework/gui-utils.ss:391:8
> C:\PLT\collects\framework\private\handler.ss:202:0: open-recent-list-item
> C:\PLT\collects\mred\private\mrmenu.ss:243:17: command method in 
> basic-selectable-menu-item%
> C:\PLT\collects\scheme\private\more-scheme.ss:155:2: 
> call-with-break-parameterization
> C:\PLT\collects\scheme\private\more-scheme.ss:260:2: 
> call-with-exception-handler
>
Can anyone suggest a way forward?  For starters, I'm not sure why 
there's a text% floating around.  I've only been dealing with 
pasteboard%s.  If anyone is sufficiently interested, I can send the 
actual file that was written (and not read).

Also, while I'm asking questions... As I read in my data, I need to 
create some custom structures that get wrapped inside my snips (i.e. 
"nodes" and "links" in an underlying graph structure).  That custom data 
all needs to be attached to a diagram-level object (the "graph").  But I 
don't see how the read methods in my various snip-class%es can best get 
hold of the diagram object (which is stashed in the frame%, which holds 
the pasteboard%, which will contain the snip%s that get created by those 
snip-class% read methods).  For now, I've got a pasteboard% on-load-file 
method setting a global variable so my various read methods can get hold 
of that shared diagram.  This seem ugly.  Any better ideas?

Thanks,

--Eric

=========================================================================
Eric Domeshek                         Phone: 617-902-2223
AI Project Manager                      Fax: 617-902-2225
Stottler Henke Associates, Inc.       EMail: domeshek at stottlerhenke.com
86 Sherman St., Cambridge, MA 02140     Web: www.stottlerhenke.com
=========================================================================



Posted on the users mailing list.