[comp.sys.mac.programmer] Support for background tasks

jdm@ut-emx.UUCP (Jim Meiss) (03/01/88)

	I am writing a program using LSC 2.15 which puts up a dialog window
containing a few editText items. The program seems to work flawlessly, 
supporting DA's, it can be switched into the background with Multifinder, etc;
however it won't allow SmartAlarms to announce that an alarm is going off.
Presumably it wouldn't work with Apple's Alarm clock as well, though I
didn't check that.
	I do call SystemTask, and inactive windows are properly updated, and
DA clocks advanced. I also call GetNextEvent in my main loop of course.
My understanding is that GetNextEvent is supposed to check 
for background tasks. 
	Is there a particular ROM routine that GetNextEvent calls to do this?
Is there something simple that I could be doing wrong? How can I check 
to see why SmartAlarms isn't being activated?
			Thanks!
						
				Jim Meiss				
		 		jdm@emx.utexas.edu
				jdm%uta.MFENET@nmfecc.ARPA
-------------------------------------------------------------------------

raylau@dasys1.UUCP (Raymond Lau) (03/09/88)

In article <1026@ut-emx.UUCP>, jdm@ut-emx.UUCP (Jim Meiss) writes:
> 
> 	Is there a particular ROM routine that GetNextEvent calls to do this?
> Is there something simple that I could be doing wrong? How can I check 
> to see why SmartAlarms isn't being activated?
> 			Thanks!
> 						
> 				Jim Meiss				
> 		 		jdm@emx.utexas.edu
> 				jdm%uta.MFENET@nmfecc.ARPA
> -------------------------------------------------------------------------

GetNextEvent calls the routine pointed to by jGNEFilter...(as its last step,
if I recall...bec. the filter can get the event record).  But since you're
calling GNE...the alarm clock should work.

--
Raymond Lau                       GEnie: RayLau
100-04 70 Ave.                    CIS: 76174,2617
Forest Hills, NY 11375-5133       Delphi: RaymondLau
United States of America          MacNET: RayLau
uucp: raylau@dasys1.UUCP (..{phri,cucard,bc-cis,mstan}!dasys1!raylau})

oster@dewey.soe.berkeley.edu (David Phillip Oster) (03/18/88)

In article <1026@ut-emx.UUCP>, jdm@ut-emx.UUCP (Jim Meiss) writes:
> Is there something simple that I could be doing wrong? How can I check 
> to see why SmartAlarms isn't being activated?

Smart Alarms checks specifically that the windowkind of the frontwindow is
not dialogkind. If it sees a dialogkind window, it doesn't come up. (Just
like multifinder checks that the frontwindow's style is not modaldlgproc.
If it is, you can't easily switch.)


--- David Phillip Oster            --author of Stars
Arpa: oster@dewey.soe.berkeley.edu --
Uucp: {uwvax,decvax,ihnp4}!ucbvax!oster%dewey.soe.berkeley.edu