Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!ucsd!orion.cf.uci.edu!oberon!pollux.usc.edu!papa From: papa@pollux.usc.edu (Marco Papa) Newsgroups: comp.sys.amiga.tech Subject: Re: String Gadgets Message-ID: <15001@oberon.USC.EDU> Date: 29 Jan 89 06:43:56 GMT References: <86686@sun.uucp> <483@infohh.rmi.de> Sender: news@oberon.USC.EDU Reply-To: papa@pollux.usc.edu (Marco Papa) Organization: Felsina Software, Los Angeles, CA Lines: 21 In article <483@infohh.rmi.de> shimoda@infohh.rmi.de (Markus Schmidt) writes: >By the way. Does anyone have a method to make ActivateGadget mor >reliable. It seems to fail in 10% of the cases. A Delay(5) after >it seems to make a little improvement, is there anything better? I use something like this (this assumes a requester, and I cut out the usual loop for GetMsg, the Wait(), etc.., but should give you the idea): mes = (struct IntuiMessage *) GetMsg(window->UserPort); class = mes->Class; if (class == REQSET) ActivateGadget(&gadget, window, &req); Seems to work all the time. -- Marco Papa 'Doc' -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= uucp:...!pollux!papa BIX:papa ARPAnet:pollux!papa@oberon.usc.edu "There's Alpha, Beta, Gamma and Diga!" -- Leo Schwab [quoting Rick Unland] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=