[comp.sys.mac.programmer] Life cycle of an application

laf@mbunix.mitre.org (Lee Fyock) (01/08/91)

I have a program that I've been working on.  (Different than the one I was
heapscrambling...:-)  It cleverly hides its windows when it's suspended (don't
worry--this is an option!).  I have it set as one of my startup applications. 
Unfortunately, when it comes up as the not-last application to launch, it
doesn't know that it was suspended, so the windows just lay there.  If you get
my drift.  I was under the impression that applications received resume events
when they are launched.  I would think that startup apps would get resume
events after they are launched, followed by a suspend event so that they could
clean up or do whatever they need to do to go into the background.  However, it
appears that a startup app gets neither resume or suspend events, but is
launched directly into the background.  Is this correct?  Is there any way to
know that you've been launched into the background?

Thanks,
Lee Fyock
laf@mbunix.mitre.org