[comp.windows.x] Toolkit name/class and "Hello, World" article

diamant@hpfclp.HP.COM (John Diamant) (12/08/87)

Several weeks ago, the question came up about what the distinction between
name and class was in the Toolkit/resource manager.  Some people were
claiming that the name of an application was its argv[0] and its class was
some more global name (like "editor") while others were claiming that its
name was unique to a particular instance (like a buffer name in an editor)
and its class was its argv[0].  I seem to remember the second being agreed
upon, but I'm not sure.

However, I notice in the "Hello, World" article, David Rosenthal chose the
former interpretation in his sample Toolkit program.

The most recent Toolkit documentation states that the name is "Name of this
instance of the application." and class_name is "Class name of this
application.  Usually the generic name for all instances of this
application."  That seems to support the second interpretation above, not
the one in the article.  So which is it?  The only way I can reconcile the
wording above with the article usage would be if an instance of an
application means a copy of this application saved under a particular name.


John Diamant			UUCP:  {hplabs,hpfcla}!hpfclp!diamant
Hewlett-Packard Co.		ARPA Internet: diamant%hpfclp@hplabs.HP.COM
Fort Collins, CO

tom@hpcvlo.HP.COM (Tom Houser) (12/15/87)

Normally, widgets like scrollbar, command button, etc. are given their
class name by the class from which they are derived.  Their name can be
specified by the programmer.  The toplevel widget (the one created when
XtInitializ is done) is special in that the programmer may specify both
name and class.  There is no convention yet that I know of regarding the
toplevel name or class vis-a-vis argv[0].

                                            Tom Houser
					    hplabs!hp-pcd!tom