[comp.sys.mac] Crunched shell

crunch@well.UUCP (John Draper) (10/08/87)

   I'm compiling up quite an impressive list of goodies to include in
"the crunched shell".   Quite a few people have submitted very valuable
source code listings for such things as MIDI drivers and some other
stuff.    I have responded to EVERY one who has mailed and requested
information.   If you mailed to me,  and haven't gotten a reply,  it
means my "mailer" hasn't generated a proper path to your site.

   I have enough in the list to keep an army of programmers busy for
the next 30 years,  so I'm going to be rather selective in choosing
which features I want to include in the first "cut".

   Because of the Hackers 3.0 Conference coming up this weekend,  I'm
holding off publishing the list of features until after I've submitted
it to the attendees this weekend.    By then,  I'll have a pretty good
idea of what I should include.   I suspect that I'll be starting the
"shell" consolidation while at Hackers 3.0.

   I also hacked up a piece of code that writes C code, given a dialog
resource.    This should save me considerable time.    It basically
does the following:

1.  Asks for a resource file containing a Dialog.
2.  Allows user to select:  Pascal or C,  LightSpeed or MPW.
3.  It goes out there and looks at the DITL for the Dialog,  and using
    a code "Template" stored in a standard TEXT file,  it generates
    C or Pascal Source code that handles the Dialog.   It currently
    handles MODAL,  but MODELESS is also planned.
    
3.  It creates a C or Pascal function with the same name as the
    DLOG resource,  and #defines constants representing the
    DITL items with the same names as the DITL resource.
    
4.  It "builds" up the "case" statements and commenting where you
    can add your button handling code.
    
  All templates and "STR#" resources live in the application.   For
instance,  the names of the files you "#include" are stored in
"STR#" resources so you can modify them.   It then makes substitutions
gotten from the actual resource during the code generation phase.

  I'll be using this program to generate the SHELL program,  and probably
wind up including the "Code generation" part in the SHELL.   By the
time the first "cut" is released,  It should be pretty well tested.

  One of the things I HATED about Mac programming,  is to go looking
for Dialog handling code, and hacking it up to meed my needs.   Now,
I don't have to do it.    I plan on doing the following code generators:

1.  Desk accessory shell
2.  generic Application shell - A "Starter upper".
3.  Modal and Modeless dialogs.

   The "application shell" generator will go out and "look" at the
menu resources,  and create a "do_command()" function with all the
necessary "case" statements where you can add your OWN code for
your own purposes.    A "GetNextEvent" or "WaitNextEvent" loop will
be generated,  and generic update, activate, inDrag,  inGrow code
will be generated.    Naturally,  your applications needs might be 
different,  and I plan on allowing options to be selected by a dialog
for customization.

    One question I have for anyone out there.....  Does anyone know
if a RAMDISK exists that can survive a "cold reset" for a Mac II like
the Levco Prodigy Mac??   Or is that some special hardware hack??
I suppose some modifications might be needed to keep the power on
during the reset.

   A lot of people have been asking me about our Programmers Network,
and requesting information.   I was wondering if I should post a SHORT
posting explaining what we do without making it sound like an (ughh!)
commercial.   It IS non-commercial.

John Draper
Programmers Network
....ihnp4!ptsfa!well!crunch

tedj@hpcilzb.HP.COM (Ted Johnson) (10/17/87)

I, for one, would like to hear more info. about the "Programmer's
Network".  My cat, for two, is also interested. :-)

	-Ted