[net.micro.mac] ET Icon Editor Question...

harrow@dec-exodus.UUCP (05/03/86)

I've been attempting to use the ET Icon Editor, written in RASCAL, as a
RASCAL learning tool.  However, I can't seem to get a working application 
out of it when I compile it.

My steps are as follows:

1.	Compile the LIBRARY file to a .ras file.

2.	Compile the SOURCE file to a .ras file.

3.	Link the SOURCE file (the source file contains the link directive to
	point to the LIBRARY file (note that there were NO errors during
	the compile phases).

	On my first link attempt, I was left with anundefined symbol CROSS.
	Looking at things, I simply replaced the reference to CROSS() with
	the appropriate 
code to generate the cross-cursor, and a subsequent
	LINK finished fine.

4.	I then chose EXECUTE SAME from the RASCAL menu and ended up with a
	blank application window with the watch cursor flashing.  I had to
	RESET to get things going again.

5.	I then tried using the MAKEAPPL utility to turn the .obj into a
	standalone application, turning OFF things like default menus (the
	program seems to make its own), etc., but at best I end up with a 
	bomb and a menu bar containing "dim" random characters.

Since the application obviously DID work (since the standalone application was
distributed along with the sources, I must be missing something.  Can some
RASCAL guru give me a hand?

Thanks,

Jeff Harrow

briand@tekig4.UUCP (Brian Diehm) (05/08/86)

> I've been attempting to use the ET Icon Editor, written in RASCAL, as a
> RASCAL learning tool.  However, I can't seem to get a working application 
> out of it when I compile it.
> . . . 
> Since the application obviously DID work (since the standalone application was
> distributed along with the sources, I must be missing something.  Can some
> RASCAL guru give me a hand?

OK, I'm the author of the thing, and may or may not be a Rascal guru.

The answer is that this is a fairly sophisticated Rascal application, one that
uses resources to define menus and such instead of calling run-time library
entries to do these things.

The steps described are all correct, except that when running the MakeAppl
utility, I built the application against a custom version of RasAppl.Master.
The custom version was made by using the resource editor on the standard
RasAppl.Master, adding the menus and other things desired.  MakeAppl allows
you the option of specifying what file you wish to use as the template.

RASCAL DOES NOT REQUIRE THAT YOU DO THIS, and the EasyMenus and other Easy-
libraries will allow you to do this stuff and still utilize the standard
supplied RasAppl.Master.  I wanted to learn how to set up an application with
resources, both because it takes less code and because the application that
results is more general, Mac-like, and modifiable (customizable).  Also, this
way one needs only once to create custom icons, About... dialogs, etc.
The thing I found was that it is typically EASIER to use the real toolbox
calls, but the cost is that you must form a custom RasAppl.Master, and then
debug from the final form.  It certainly downsizes the final result, too.

The irony is that given the way Rascal places its code (in the data fork),
the working application can also serve for a MakeAppl template!  In other words
if you're trying to recreate the application, building it upon the working
copy should yield successful results.  Now, that may be a less than convincing
demo (gee, I take a working appl, put my code in, and get an identically
working appl, oh wow), so I would suggest the following.

1)  Copy the working appl to a file called say ETic.Master.

2)  With FEdit or some such, completely remove the data fork.

3)  Verify that this doesn't work as an application.  Careful here, you will
    probably get a bomb box.

4)  Do the steps outlined in the original posting, but instead of letting 
    MakeAppl use the default RasAppl.Master, set it to use ETic.Master instead.

5)  Voila!

-Brian Diehm
Tektronix, Inc.