Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!samsung!spool2.mu.edu!news.cs.indiana.edu!msi.umn.edu!sctc.com!pasturel From: pasturel@sctc.com (Pierre Pasturel) Newsgroups: comp.windows.x.motif Subject: Re: Determining children widget IDs (Summary) Message-ID: <1991Jan3.181945.26911@sctc.com> Date: 3 Jan 91 18:19:45 GMT References: <20.277b089c@idicl1.idi.battelle.org> <21.277e1314@idicl1.idi.battelle.org> <1991Jan2.185621.20296@sctc.com> Organization: Secure Computing Technology Corporation Lines: 56 >As an observation, I thought that one should never include both >IntrinsicP.h and Intrinisic.h (and the same goes with Composite include >files). I set up the includes like I did based on some example code in Douglas A. Young's book "The X WINDOW SYSTEM Programming and Applications with Xt" OSF/MOTIF edition. It seems to work fine for me. Looking into it further, my X11/IntrinsicP.h header file includes X11/Intrinsic.h anyhow so I don't see a problem. I am on VMS though and this may make a difference. -- * Roger Grywalski - Software Developer | GRYWALSKI@IDICL1.IDI.BATTELLE.ORG * Information Dimensions Inc. | * 655 Metro Place South | * Dublin, Ohio 43017 | **************************************************************************** Ok, I remember, the problem was not the order in which the include files are included (as you pointed out, IntrinsicP.h includes Intrinsic.h), but the problem I had was that some functions were being redefined by IntrinsicP.h which always returns a value of 0 which was used by another function, resulting in a core dump. For example, Intrinsic.h had the following fucnction prototypes: extern Display *XtDisplay(); /* Widget widget; */ extern Screen *XtScreen(); /* Widget widget; */ extern Window XtWindow(); /* Widget widget; */ which are then redefined by IntrinsicP.h as follows: #define XtDisplay(widget) ((widget)->core.screen->display) #define XtScreen(widget) ((widget)->core.screen) #define XtWindow(widget) ((widget)->core.window) The three macros were returning a value of 0 (I guess those core fields were not initialized). I don't know why they are zero, but when I did not include IntrinsicP.h, the function protocols in Intrinsic.h worked fine (they returned legitimate display, screen, and window numbers). So, what I don't know is why I have zero screen->display, screen, and window widget fields. Any ideas on that?? I am running OSF/Motif 1.0 with X11R4 on a 3/60 with SUN OS 4.0.3 Pierre pasturel@sctc.com