Path: utzoo!attcan!ncrcan!becker!censor!comspec!tvcent!lethe!torsqnt!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!snorkelwacker!bloom-beacon!APS1.SPA.UMN.EDU!zoo From: zoo@APS1.SPA.UMN.EDU Newsgroups: comp.windows.x Subject: Problem with asciiTextWidget callback Message-ID: <9005062345.AA03834@aps2.spa.umn.edu> Date: 6 May 90 23:45:53 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 69 I am trying to register a callback with the asciiTextWidget. I create the widget, then add a callback with XtAddCallback. When I execute the code, I get a message: Warning: Cannot find callback list in XtAddCallbacks and then the program runs. Everything works, except that my callback is never called. This happens with R4pl4 and R4pl11, on Sun 4 and Sequent Symmetry, cc and gcc. Thanks for any help. If this turns out to be RTFM, please tell me where in which FM. I've got the R4 docs and O'Reilly 4 & 5. This should work, from what I've read. david d [zoo] zuhn Univ. of Minnesota Dept. of Astronomy zoo@aps1.spa.umn.edu Automated Plate Scanner Project -------------- the code i'm using ----------------- #include #include #include #include #include #include void Text_Callback (w, client_data, call_data) Widget w; XtPointer client_data; XtPointer call_data; { printf ("text changed\n"); } int main (argc, argv) int argc; char **argv; { Widget string, top; top = XtInitialize (argv[0], "TEst", NULL, 0, &argc, argv); string = XtVaCreateManagedWidget ("string", asciiTextWidgetClass, top, XtNstring, "test", XtNeditType, XawtextEdit); XtAddCallback (string, XtNcallback, Text_Callback, NULL); XtRealizeWidget (top); XtMainLoop(); }