Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!spool.mu.edu!cs.umn.edu!uc!shamash!timbuk!aspen30!de From: de@aspen30.cray.com (Duane Eitzen) Newsgroups: comp.windows.x Subject: Re: Xaw AsciiText XtAddCallback ?? Message-ID: <112945.3370@timbuk.cray.com> Date: 17 May 91 19:28:59 GMT References: <341@imp.UUCP> Organization: Cray Research, Inc., Eagan, MN Lines: 23 In article <341@imp.UUCP> devil@diablery.10A.com (Gil Tene) writes: >Hello X'ers, > >I was trying to specify a callback funtions for a Xaw AsciiText, >and found this "strange" behaviour : > >When trying to specify the callback using : > XtAddCallback(text1, XtNcallback, > MyTextCBhandler, (XtPointer) &text_data1); > >I get a "Warning: Cannot find callback list in XtAddCallbacks" >at runtime, and the callback doesn't work... > >BUT: when I specify an explicit callback list during the creation >of the asciiTextWidget, it works... (took me a while to think of >trying it this way) : > I am just learning X myself and I hit the same problem. The source of the problem is that the "callback" resource is actually a resource of the "AsciiSrc". Thus you can go: XtAddCallback(XawTextGetSource(tgadget),XtNcallback, ...) Duane Eitzen.