Path: utzoo!attcan!uunet!lll-winken!csd4.milw.wisc.edu!mailrus!purdue!bu-cs!bloom-beacon!oberon!polyslo!cosmos.acs.calpoly.edu!mike From: mike@cosmos.acs.calpoly.edu (Mike Patnode) Newsgroups: comp.windows.x Subject: Re: XtSetArg bug (Really: C Language understanding bug) Message-ID: <9406@polyslo.CalPoly.EDU> Date: 14 Mar 89 18:42:41 GMT References: <118@kauai.ACA.MCC.COM> Sender: news@polyslo.CalPoly.EDU Reply-To: mike@cosmos.acs.calpoly.edu.UUCP (Mike Patnode) Organization: Cal Poly Academic Computing Services, San Luis Obispo Lines: 31 In article <118@kauai.ACA.MCC.COM> duanev@kauai.ACA.MCC.COM (Duane Voth) writes: > > Arg arg; > > XtSetArg(arg, XtNcallback, callrec); > XtSetValues(widget, arg, ONE); ^^^^This is an arg variable instance. > >Seems to segviol down in XtSetValues. The work around is: > > Arg arg[1]; > > XtSetArg(arg[0], XtNcallback, callrec); > XtSetValues(widget, arg, ONE); ^^^^This is an arg pointer. Try XtSetValues(widget, &arg, ONE); in the first case. Arg arg[1]; and Arg arg; are not the same thing. You'll probably get flamed to death about this. >(I'm Mailing to xbugs too) Oops, you'll probably wan't to rmmailq on that one. ---- Mike "Dodger" Patnode | mike@cosmos.ACS.CalPoly.EDU Yitbos Innovations Inc. | or 244 California Blvd | mpatnode@polyslo.CalPoly.EDU San Luis Obispo, Ca 92630 | (805) 541-2048 / 543-9818 / 756-2516