XmRegisterConverters ???

68 views
Skip to first unread message

zei...@wharton.upenn.edu

unread,
Feb 3, 1992, 6:03:16 PM2/3/92
to

Hello X-gurus!

What does the " XmRegisterConverters(); " call do?

I haven't had any success finding out what it does.

Please tell me. I would appreciate it if you could

email the answer because I am 3000 messages behind

on this NEWS group. Thanks! I will post the

answers I get if there is enough interest.

Thank you again!

Gregory Zeibari
email: zei...@wharton.upenn.edu

Patrick L. Mahan

unread,
Feb 4, 1992, 7:56:13 PM2/4/92
to
#
# What does the " XmRegisterConverters(); " call do?
#
# I haven't had any success finding out what it does.
#
# Please tell me. I would appreciate it if you could
#
# email the answer because I am 3000 messages behind
#
# on this NEWS group. Thanks! I will post the
#
# answers I get if there is enough interest.
#

Strange, I find no mention of XmRegisterConverters() in
my Motif documentation. As a guess I would say that it
would register 1 or more Resource type converters. However,
I don't see any documentation for this. Maybe you are at
a higher release level than I am.

Patrick L. Mahan

--- TGV Window Washer ------------------------------- Ma...@TGV.COM ---------

Be wary of strong drink. It can make you shoot - Lazarus Long
at tax collectors -- and miss. From the Notebooks of
Lazarus Long

Kee Hinckley

unread,
Feb 6, 1992, 12:42:24 PM2/6/92
to
In article <9202041656...@TGV.COM> ma...@tgv.COM (Patrick L. Mahan) writes:
> Strange, I find no mention of XmRegisterConverters() in
> my Motif documentation. As a guess I would say that it

It's not documented because it's an internal call that should have had
an _ in front of it. It does exactly what it says, but Motif already
calls it, so you don't have to. And even if you did (perhaps because
you wanted to force Motif to register converters before creating widgets)
you wouldn't accomplish what you planned unless you called a second call
which *does* have an _ in front of it.

XmRegisterConverters();
_XmRegisterPixmapConverters();
XtAddConverter(XtRString, XtRPixmap, CvtStringToPixmap, &widgetConvertArg, 1);
XtAddConverter (XmRString, XmRGadgetPixmap, CvtStringToGadgetPixmap, &gadgetConvertArg, 1);

That's the dangerous path of course. You'd be better off creating one
instance of a primitive and a composite widget and then deleting them.
That has the same effect.
--
Alfalfa Software, Inc. | Poste: The EMail for Unix
naz...@alfalfa.com | Send Anything... Anywhere
617/497-2922 | in...@alfalfa.com

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.

Michael Morrell

unread,
Feb 8, 1992, 8:14:01 PM2/8/92
to
comp.windows.x / ma...@tgv.COM (Patrick L. Mahan) / 4:56 pm Feb 4, 1992 /

Strange, I find no mention of XmRegisterConverters() in
my Motif documentation. As a guess I would say that it
would register 1 or more Resource type converters.
----------

I'd also like to know why it isn't documented. My experimentation suggests
that calling XmRegisterConverters is the only way to actually register all of
the defined Motif type converters. Without this call, it doesn't seem
possible to have an entry in the XtResource struct allowing the user to
specify a fontList for the application (an XtRString to XmXmFontList converter
isn't automatically registered).

Am I confused or is this simply a documentation bug?

Michael

P.S. Doug Young's Motif book lists many Motif type converters, but says
says nothing about how to use them in a program.

Andrew Wason

unread,
Feb 10, 1992, 9:36:58 PM2/10/92
to
In article <1992Feb6.1...@alphalpha.com>, naz...@alphalpha.com (Kee Hinckley) writes:
> That's the dangerous path of course. You'd be better off creating one
> instance of a primitive and a composite widget and then deleting them.
> That has the same effect.

Or use XtInitializeWidgetClass to avoid needlessly
creating/destroying a widget.

Andrew

_______________________________________________________________________________

Andrew Wason Bell Communications Research
a...@bae.bellcore.com Piscataway, NJ
bellcore!bae!aw

Reply all
Reply to author
Forward
0 new messages