Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!uakari.primate.wisc.edu!polyslo!cosmos.acs.calpoly.edu!rbannon From: rbannon@cosmos.acs.calpoly.edu (Roy Bannon) Newsgroups: comp.sys.apple Subject: Re: Speed.... Summary: TaskMasterDA Message-ID: <1989Oct20.193558.15449@polyslo.CalPoly.EDU> Date: 20 Oct 89 19:35:58 GMT References: <8910180053.aa04251@SMOKE.BRL.MIL> <935@friar-taac.UUCP> Sender: news@polyslo.CalPoly.EDU (News Guru) Reply-To: rbannon@cosmos.acs.calpoly.edu.UUCP (Roy Bannon) Organization: Cal Poly State University -- San Luis Obispo Lines: 30 I am having a little trouble writing an NDA using the taskmaster to track the controls. The window is a resource created with two controls, a radio button and a normal button. The window is created just fine with a newwindow2 call. I also make sure a save and restore the current res Id when any of the da routines are run. The problem is this. In the action routine, when the code is 1 (for DAEvent); I call taskmasterda with the pointer passed to my action routine (params). Sometimes, it returns with error\ $0E03. My question is what calls need to be made in what general order to make taskmasterDA handle my buttons and return the CtrlID of the button that was hit. This NDA is supposed to change the desktop, which it does fine. The only problemI have is that sometimes the palettes get screwed up. The first time the Init routine is called, is send the message to the message center about the desktop. It also sends a message that contains the color palette for the picture. The first thing the DaInit routine does is look for that message about the color palette. If it's there then it knows that the message about the desktop has already been sent and just resets the color palette. This was done so that it isn't always loading the file every time the da is loaded and the init rou tine is called. This works fine most of the time. Some programs (like TML pascall II, which this is written in) seem to reset the message center, because the picture is loaded every time. Also, sometimes after going into prodos 8 and back, the message s still in the desk center, but the palette is screwed up. How long due messages stay in the center? If there is a problem with the above algorithm, what is it? Any and all help appreciated. Roy rbannon@cosmos.acs.calpoly.edu