This note concerns the "Attempt to unmanage a child when parent
is not Composite" problem in MEDM. First, I apologize for not reading
the messages more carefully. Hopefully, this is a better thought out
reply.
The dialog box associated with the Related Display is a Motif
form dialog. It is created with:
rdForm = XmCreateFormDialog(parent,"relatedDisplayDataF",args,n);
shell = XtParent(rdForm);
...
relatedDisplayS=shell;
parent: The parent of the form dialog, which is the Label/Name/Args
push button in the resource palette.
rdForm: The widget created.
shell: The parent of the form dialog.
The catch is that the form dialog is really a dialog shell with a
form child. If all works right, XmCreateFormDialog returns the form
widget, and the widget hierarchy looks like:
push button (Push Button)
shell=relatedDisplayS (Dialog Shell)
rdForm (Form)
Now, it makes sense to pop up and pop down a shell, and this is
what should be happening. No extra managing or unmanaging should be
necessary. The code that gets run when the Close button is pushed
should be:
case RD_CLOSE_BTN:
if (XtClass(w) == xmPushButtonWidgetClass) {
XtPopdown(relatedDisplayS);
}
The following line in MEDM 2.3.3 should not be there:
XtUnmanageChild(relatedDisplayS);
And it is NOT the "fix" for the problem that I said it was. Popping
it down is enough. In addition, I do not think the "fix" proposed by
Thomas Birke is the correct one, and I do not believe the comment
about "medm-2.3.3 tries to unmamage a child, that has never been
managed" is correct.
The Motif documentation is not clear about whether the dialogShell
or the form is returned from XmCreateFormDialog. If the widget
returned were the dialogShell, then its XtParent would be the push
button. The push button is not descended from Composite, and it does
not make sense to pop it up and down. This may be what is happening
on some platforms.
This could be checked by putting code like the following after the
shell = XtParent(rdForm) line:
#if DEBUG_COMPOSITE
{
Widget w=rdForm;
Window win=XtWindow(w);
int i=0;
while(1) {
printf("%4d w=%x win=%x",i++,w,win);
if(w == mainShell) {
printf(" (mainShell)\n");
break;
} else if(w == shell) {
printf(" (shell)\n");
} else if(w == rdForm) {
printf(" (rdForm)\n");
} else if(w == parent) {
printf(" (parent)\n");
} else {
printf("\n");
}
w=XtParent(w);
win=XtWindow(w);
}
}
#endif
The Shell Command is handled the same way and the Related
Display.
Finally, MEDM 2.3.3 works correctly on Solaris 2.5, my
development platform. MEDM 2.3.4beta1, the next version, works
correctly on Solaris 2.5 and WIN32. Mark Rivers and I have verified
it also works correctly on Digital UNIX. This development version has
fixed some esoteric bugs that may have been clobbering code elsewhere,
so the fact that this version works does not necessarily mean MEDM
2.3.3 works on all those platforms. (MEDM 2.3.3 certainly does not
work on WIN32. I have been spending most of my time recently, in
fact, making MEDM work on WIN32.)
There still seem to be problems with MEDM 2.3.3 or later on
LINUX. Bonnie Madre is working on this. I am helping as I can.
-Ken
- Navigate by Date:
- Prev:
symbol for calcout record Benjamin Franksen
- Next:
Final emailing on the collab meeting Bob Dalesio
- Index:
1994
1995
1996
1997
<1998>
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: Medm error message... Chris Larrieu
- Next:
MEDM Issues Ken Evans
- Index:
1994
1995
1996
1997
<1998>
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|