Xref: utzoo comp.windows.x:29305 comp.windows.x.motif:1145 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!wuarchive!udel!rochester!kodak!ispd-newsserver!sydorow From: sydorow@bisco.kodak.com (Steve Sydorowicz) Newsgroups: comp.windows.x,comp.windows.x.motif Subject: Re: Gadgets and illegal Xt functions Keywords: Xt Gadgets Message-ID: <1990Nov9.150118.20094@ssd.kodak.com> Date: 9 Nov 90 15:01:18 GMT References: <9349@b11.ingr.com> Sender: news@ssd.kodak.com Organization: Eastman Kodak Lines: 27 doyle@b11.ingr.com (Doyle Davidson) writes: >I discovered that the error was due to the use of >XtDisplay() and passing it a PushButtonGadget. > > [ small amount deleted ] > >So my questions are: > 1) Should I be including XmP.h in my application? > (Obviously yes, but am I SUPPOSED to?) > 2) Should that macro (and potentially others) have been in Xm.h instead? > 3) Won't it still blow up if I call the libXt function instead? Motif 1.1 is geared more towards the R4 Intrinsics. In R4, there are some changes/additions to some of the functions/macros. In the particular case you've mentioned, what you want to use is XtDisplayOfObject() which will work with widgets *and* gadgets. Another example is XtWindowOfObject(). You should not need to include a "P".h file. For more help, check an Xt manual (if you can get your hands on one) and pay attention to Section 12.5 "Widget Arguments to Intrinsics Routines." Good luck -- -------------------------------------------------------------------------------- Stephen J. Sydorowicz Azatar Computer Systems sydorow@bisco.kodak.com (716)726-5636 Opinions expressed are "mine and mine alone."