Newsgroups: comp.lang.lisp.x
Path: cantaloupe.srv.cs.cmu.edu!rochester!udel!gatech2!swrinde!newsfeed.internetmci.com!in2.uu.net!usc!ccnet.com!boo!netcom.com!mayer
From: mayer@netcom.com (Niels P. Mayer)
Subject: Re: Persistent objects in xlisp...how ???
Message-ID: <mayerDIu4AI.6tp@netcom.com>
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
References: <49i118$729@cc.tut.fi>
Date: Thu, 30 Nov 1995 02:30:17 GMT
Lines: 40
Sender: mayer@netcom4.netcom.com

In article <49i118$729@cc.tut.fi>, tek@cs.uta.fi (Teppo Kuusisto) writes:
> Is it possible to save objects or functions in a file from xlisp.
> In other words i wan't to dump lisp function and it's data into
> a disk file and then load it later.

XLISP 2.1g has working SAVE/RESTORE functionality that does the job of
saving a whole workspace into a *.wks file. This allows you to ship a
working application without direct source code, (however, some extra
trickery is needed to prevent users from dumping all the functions in
source form)... It also makes applications load up slightly faster as well.

In addition if you load "lib-utils/classes", you should check the :STOREON
method for objects which lets you make objects persistent.  In WINTERP, see
also the :STOREON method on TANGOIMAGEOBJects, which allows you to save
graphical objects into a file...

Since your next message indicates you're using WINTERP
(http://www.eit.com/software/winterp), you'll note that SAVE/RESTORE have
been removed from all versions of WINTERP <= 2.03.  This was due to a
number of problems in saving X/Motif window state in a running application.
I've partially fixed this problem for future releases.

I currently have an awaiting release version of WINTERP (version 2.10) that
has a working SAVE/RESTORE implementation ... this allows you to ship
quick-loading WINTERP apps without source. However, you have to slightly
re-work some of your application so that you have an initialize function to
create all your widgetry, pixmaps, colors, filesystem input callbacks,
subprocesses, etc each time the application starts up; All functions,
closures, methods, variables etc are saved in the workspace, so all you
really need is a workspace file, the executable, and a small initialization
file that calls the init functions to crank up the GUI components.

Unfortunately, until December 31 1995, I have a drop dead dealine at work
and have no time to put out a new release of WINTERP. If the 12/31 deadline
goes badly, however I'll have plenty of time :-), for a new release of
WINTERP, looking for a different project to work on, etc...

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=  Niels Mayer   http://www.cyborganic.com/People/niels   mayer@netcom.com  =
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
