Re: Persistence... of a sort

GWRepNate@aol.com
Thu, 26 Sep 1996 10:38:54 -0400

In a message dated 96-09-26 09:47:52 EDT, jom@ccc.fi (Miettunen Jouni)
writes:
> /***************************************************************
> * void MSG_GEN_PROCESS_CREATE_NEW_STATE_FILE
> * (MemHandle appInstanceReference)
> ***************************************************************/
> /* Completely disable the state file for your application. */
> @method ReversiProcessClass, MSG_GEN_PROCESS_CREATE_NEW_STATE_FILE
> {
> return( NullHandle );
> }

Probably Ed Ballot passed this out. He added this to several sample apps.

> I also use the "neverSaved" magic keyword when defining the process class,
> but I haven't checked what it is supposed to do :)
>
> @classdecl ReversiProcessClass, neverSaved;

All this does is says that objects of this class shouldn't be saved to
state. It's similar to marking a resource "notDetachable". The process object
is a hybrid which has no instance data, thus there is nothing to save to
state. That's why you'll see every process class declared using the
neverSaved flag.

Template resources, such as resources associated with documents, are
typically given the notDetachable flag. This means that the template resource
(and duplicatees made from it) won't be saved to state. It is then up to the
program to save the objects in the document file and restore them when the
program is restored from state (or when the document is opened normally).

Nathan