Path: utzoo!mnetor!uunet!husc6!rutgers!lll-lcc!lll-tis!ptsfa!well!shf From: shf@well.UUCP (Stuart H. Ferguson) Newsgroups: comp.sys.amiga Subject: Re: String Gadgets resolved Message-ID: <4882@well.UUCP> Date: 2 Jan 88 08:53:38 GMT References: <1972@amiga.amiga.UUCP> <2030@navajo.UUCP> <195@gtss.UUCP> Reply-To: shf@well.UUCP (Stuart H. Ferguson) Organization: The Blue Planet Lines: 39 The Return of the String Gadget ... part six ... The story so far: I'm processing IntuiMessages from a requester in a loop which has some code in it like this case GADGETUP: ... case STR_ID: sscanf (buffer, "%d", &val); val = val % 16; sprintf (buffer, "%d", val); RefreshGList (&strgad, win, req, 1L); break; ... This is supposed to update the value in a string gadget buffer and refreash the string gadget. It doesn't work. The Guy in The Cape suggests that I need to insert a RemoveGadget() and AddGadget() before the sscanf() and after the sprintf(), respectively. He points out that this is mentioned in the AutoDocs. Sure enough, it is mentioned in the AutoDocs and seems like a sensible thing to do but for one small detail. It doesn't work. My Amiga goes for a holiday and doesn't leave a forwarding address (lock up). I suspect that this happens because this is a Requester gadget, and the Add/RemoveGadget() functions are specifically for *Window* gadgets. RemoveGadget() says that it will remove a REQGADGET and it does seem to remove it and even returns a reasonable position. But when I call the AddGadget() function it never returns. So, the question remains, what is the correct way to update a string gadget in a requester? Stuart Ferguson Action by HAVOC