[comp.windows.x.motif] XmNcreateCallback -- what is it?

david@twg.com (David S. Herron) (10/20/90)

I have a copy of Xvt for ISC's SysVr3.? & their X11/Motif.  But I
don't have that system to compile on.  (Don't ask..)  I've mostly
been working with Motif directly on Intel SysVr3.2.2 with their
X11R3+Motif (v1.0.?).  I've installed the Xvt I have on this Intel
based system to see if it would "accidentally" work ..

Comes close -- Trying to make the demo programs, the C source
compiles and links just fine.  CURL produces a .uil file just fine.
The compiled program also runs and displays an X popup dialog
successfully, but since the .uil->.uid step didn't succeed nothing
more can be done except display this dialog saying the .uid file
wasn't found.  The problem is that Xvt uses an XmNcreateCallback
for most of the widgets to (apparently) make a call into their code
when the widget is created.

The problem is that in neither of the Motif packages I have (v1.0.?)
include that specific value.  The closest is an MrmNcreateCallback
which probably doesn't do the same thing since it's from Mrm, not Xm.

Since most of it works then I'm thinking the rest of it just might ..

As always -- any help would be appreciated.

		David

-- 
<- David Herron, an MMDF & WIN/MHS guy, <david@twg.com>
<- Formerly: David Herron -- NonResident E-Mail Hack <david@ms.uky.edu>
<-
<- Remember:  On System V it's "tar xovf", not "tar xvf"!

nazgul@alphalpha.com (Kee Hinckley) (10/20/90)

> wasn't found.  The problem is that Xvt uses an XmNcreateCallback
I find this strange.  I can't find an XmNcreateCallback anywhere in 1.1
either.

giguere@csg.uwaterloo.ca (Eric Giguere) (10/23/90)

In article <901019194247.2541@alphalpha> nazgul@alphalpha.com (Kee Hinckley) writes:
>> wasn't found.  The problem is that Xvt uses an XmNcreateCallback
>I find this strange.  I can't find an XmNcreateCallback anywhere in 1.1
>either.

XmNcreateCallback is a "fake" callback resource used only in UIL files.  The
problem is that when you specify a widget tree in a UIL file you have no way
of mapping actual widgets to resource IDs.  So when you retrieve a widget
tree using one of the MrmFetch functions, the XmNcreateCallback for each
widget will be called, and this is where you can do your widget-to-ID mapping.
Just treat it like any other UIL callback, but remember that it doesn't
really exist -- you can't try setting it when creating widgets dynamically.

This should probably be documented somewhere.

--
Eric Giguere                                       giguere@csg.UWaterloo.CA

gaf@uucs1.UUCP (gaf) (10/23/90)

In article <8125@gollum.twg.com> david@twg.com (David S. Herron) writes:
>
>The problem is that in neither of the Motif packages I have (v1.0.?)
>include that specific value.  The closest is an MrmNcreateCallback
>which probably doesn't do the same thing since it's from Mrm, not Xm.

Surprise!  They are the same.  The name changed from XmN to MrmN in Motif
version 1.0.A (basically 1.0 with 1.0.1 patches).  I don't know why; seems
kind of arbitrary to me but it must satisfy someone's sense of balance
in OSF.
-- 
Guy Finney					It's that feeling of deja-vu
UUCS inc.   Phoenix, Az				all over again.
ncar!noao!asuvax!hrc!uucs1!gaf	sun!sunburn!gtx!uucs1!gaf

pd@ixi.uucp (Paul Davey) (10/24/90)

In article <8125@gollum.twg.com> david@twg.com (David S. Herron) writes:


... The problem is that Xvt uses an XmNcreateCallback
   for most of the widgets to (apparently) make a call into their code
   when the widget is created.

   The problem is that in neither of the Motif packages I have (v1.0.?)
   include that specific value.  The closest is an MrmNcreateCallback
   which probably doesn't do the same thing since it's from Mrm, not Xm.

As already mentioned XmNcreateCallback is a pseudo callback generated
by uil/mrm when a widget is created. 

At version 1.0.A it was renamed to MrmNcreateCallback to avoid
confusion and reflect the fact that it is added by uil/mrm rather than
by the intrinsics as the old name implies.

--
 Regards,			 pd@x.co.uk          IXI Limited
	Paul Davey		 pd@ixi.uucp         62-74 Burleigh St.
				 ...!uunet!ixi!pd    Cambridge  U.K.
 "These are interesting times"   +44 223 462 131     CB1  1OJ