[comp.windows.x] BUGS with argv and argc resources ?

nico@bredex.UUCP ( BREDEX GmbH) (03/05/91)

Hi Folks,
i got some questions about the correct usage of the resources 'argv' and 'argc',
that are defined for the ApplicationShell widget class.
As far as I know they are for setting the WM_COMMAND property, that
every application should set.

They are rarely documented and explained.
So please, especially people from MIT, help me (and others) to use
them right.

Here are my questions:

1) Does the resource 'argv' has to end with a NULL element ?
   XtAppInitialize() appends one, but if I understand ApplicatonShell
   source code right, it is not necessary.

2) Why does the ApplicationInitialize method copy only the adresses of the
   argv string not the strings itself for internal usage ?
   Shouldn't that be done or otherwise be documented ?

3) Following ICCCM, I have to update the resources for resetting the
   WM_COMMAND property, so that it always reflects a command that will
   restart the application in their current state.

   OK, but HOW ?

   The ApplicationShell has NO SetValues-Method to do it right.
   I think, it should normally do the same as in the Destroy and the
   Initialize method, namely free old data and copy new data,
   but it does not.
   I think this is a bug !

   Is it ?
   If it is, when will it be fixed ?

4) I wished there would be a convenience function for updating
   argv and argc resources.
   It is not easy to find the right argv element and to change its
   contents, if it exists, or to add a new one, if it is not there.

BTW) For the resource 'geometry' shell widgets also make no internal copy.
   It took us two days to find out, why sometimes a shell widget
   had the right place on the screen and sometimes not.
   All we did, we took a local string for setting that resource in a
   function that didn't realize the widget.

If anybody answers, please also send a mail direct to "nico@bredex.uucp".
Thanks

--------
Nico

email:   nico@bredex.uucp

phone:   +49 531 75480
fax:     +49 531 796358

address: BREDEX GmbH
         Nicolai Josuttis
         Kastanienallee 2a
         D-3300 Braunschweig
         Germany