[comp.sys.mac.programmer] Source code or information about INITs and/or Shutdown Manager

dawyd@gargoyle.uchicago.edu (David Walton) (03/24/90)

I am writing a simple INIT for our lab here which does the following:

	* Puts up a modal dialog which requests the user to type in
	  some information, with some filtering (not letting user 
	  press 'OK' if there's nothing in either of the editText 
	  fields);

	* Writes some information to a file;

	* Installs a Shutdown task to write some other information to
	  the same file at Shutdown.


Since I've never written an INIT before, I'm unsure about things such
as what (if any) ToolBox managers have to be initialized, how to
access certain globals if necessary (such as thePort), and why I'm
getting a System Error 85 (no menu Bar error) when I'm not doing
anything with menus (it _is_ an INIT, after all...).  I'm also having
problems getting my shutdown procedure to write to disk correctly, and
I'd like to know if there are restrictions about accessing filesystems
during shutdown (yes, I installed the procedure _before_ drivers were
unmounted).


So....

	* Could somebody out there send me C or Pascal source code
	  for an INIT?  MPW or THINK is preferable, but it doesn't 
	  make that much difference.  If it does any of the tasks
	  I mentioned above, so much the better.

	* Does anybody know about any restrictions on procedures
	  installed with ShutDwnInstall, and if so, could they
	  tell me?

Please respond my mail; if there's sufficient interest, I'll summarize
replies to the net.

Thanks.

-- 

David Walton		Internet: dwal@tank.UChicago.EDU  ALink: A0309}
University of Chicago   {  Any opinions herein are my own, not those  }
Computing Organizations {  of my employers (or anybody else).         }