[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Standalone applications, dialogs, etc.



Rodney Daughtrey writes:

>I'm creating a standalone application (using MACL 1.2.2) of a program
>I'm writing, and have a question.

>Since you can't have old pointers into the Macintosh heap
>lying around in the standalone application, one has to create
>all instances (including dialogs) dynamically after the
>standalone application starts up.

My problem was similar: how to save PICTs across executions of 
MACL. My solution to the problem of saving state between executions of
MACL programs was to create PICT entries into the resource fork of my 
data files  which
contain PICTs in the resource fork of my data file, and source code
in the data fork.

When my application starts up, it reads source code from the data fork
which reads the PICT resource(s) and starts execution of the task.
This fits your (and my) requirements of having a single self-contained 
data file file to execute your application. You would probably want
to create a new resource (SCOD, for "source code" is my suggestion) off
of your application file.

I hope this addresses your question ... I can post my sample code 
(which also does a copy of PICTs from the clipboard into LISP) if I can
figure out where to send it [moderator, where do I send this so it 
gets put in the Cambridge archives?]

Charlie S. Lindahl
Automation and Robotics Research Institute
University of Texas at Arlington
ARPA: lindahl@evax.utarl.edu

Note: Standard disclaimer: nobody believes me anyway, but these are my
      own opinions.