Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!timbuk!cs.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: <1991Jan2.185621.20296@sctc.com> Date: 2 Jan 91 18:56:21 GMT References: <20.277b089c@idicl1.idi.battelle.org> <21.277e1314@idicl1.idi.battelle.org> Organization: Secure Computing Technology Corporation Lines: 41 grywalski@idicl1.idi.battelle.org writes: >#include >#include >#include >#include >WidgetList GetChildren(w) > CompositeWidget w; >{ > return w->composite.children; >} >int GetNumChildren(w) > CompositeWidget w; >{ > return w->composite.num_children; >} As an observation, I thought that one should never include both IntrinsicP.h and Intrinisic.h (and the same goes with Composite include files). One of the OSF/Motif 1.0 manuals had a demo program which did include both, and this lead to much frustration later on when I found out that some fucntion protocols (e.g. XtScreen, XtDisplay,..) in Intrinsic.h were being redefined by macro defines in IntrinsicP.h by #include-ing the former followed by the latter, and this resulted in core dumps when I tried using the functions. I was told later by someone on this newsgroup never to include both, but I can't remember exactly why. Does it depend on your environment (i.e. will it work for some but not for others) ???? Its problems like these that should be inserted in a Commonly-Asked-Questions- and-Problems. I could list more things that beginner Motif programmers should look out for, but that would take too long :) Pierre pasturel@sctc.com