Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!pepper!cmcmanis From: cmcmanis%pepper@Sun.COM (Chuck McManis) Newsgroups: comp.sys.amiga Subject: Re: Gadgets question Message-ID: <40573@sun.uucp> Date: 1 Feb 88 17:50:38 GMT References: <4830003@hpiacla.HP.COM> <40497@sun.uucp> Sender: news@sun.uucp Reply-To: cmcmanis@sun.UUCP (Chuck McManis) Organization: Sun Microsystems, Mountain View Lines: 30 Another good reason to read your own postings is so that you can catch your own bugs! From the gadgets question I included the code ... In article <40497@sun.uucp> cmcmanis@sun.UUCP (Chuck McManis) writes: |> struct Gadget *TempGad, *CurrentGad; |> |> CurrentGad = (struct Gadget *)msg->IAddress; |> if (!(CurrentGad->UserData)) { |> for (TempGad = CurrentGad; TempGad != CurrentGad; |> TempGad = (struct Gadget *)(TempGad->UserData)) |> if (TempGad->Flags & SELECTED) { |> TempGad->Flags &= ~SELECTED; |> RefreshGList(MyWindow,TempGad,1); |> } |> } |> |>/* Check the parameters to RefreshGList, I don't have an Amiga handy at the |> moment. */ And if you will notice the for() loop will never get started! Change it to read for (TempGad = (struct Gadget *)(CurrentGad->UserData); TempGad != CurrentGad; TempGad = (struct Gadget *)(TempGad->UserData)) { And that will fix it right up. --Chuck McManis uucp: {anywhere}!sun!cmcmanis BIX: cmcmanis ARPAnet: cmcmanis@sun.com These opinions are my own and no one elses, but you knew that didn't you.