[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | DECWINDOWS 26-JAN-89 to 29-NOV-90 |
Notice: | See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit |
Moderator: | STAR::VATNE |
|
Created: | Mon Oct 30 1989 |
Last Modified: | Mon Dec 31 1990 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 3726 |
Total number of notes: | 19516 |
2512.0. "Help with XtNameToWidget" by THRILL::NELSON () Mon Mar 26 1990 12:14
(Also posted to DECWINDOWS_PROGRAMMING notesfile)
I have been trying to get XtNameToWidget to return a widget instance -
so far without any luck. The child is fetched and attached to the parent
in th usual way (in DwtFetchWidget). In the routine which has to decide
whether or not to fetch the widget, I use XtName... The first time through,
as expected, the result is NULL. If I unmanage the child and then execute
the routine again, I still get a NULL return. The parent widget ID is
the same and obviously the name I pass is the same.
All the widgets are defined in UIL.
The target widget in the example below is always a popup dialog box.
static void create_routine (parent)
Widget parent; /* parent of target widget */
{
Widget this_widget;
.
.
this_widget = XtNameToWidget(parent,"target_widget");
if (this_widget == NULL)
{
.
.
DwtFetchWidget(hierarchy,"target_widget",parent,this_widget,...);
.
.
}
XtManageChild(this_widget);
.
.
}
The target_widget id is ALWAYS fetched whether the first or second time
through.
I assume there is some stupid, simple thing I have overlooked, so the
question is: WHAT IS WRONG WITH THIS PICTURE?
Any help you can give will be appreciated.
Thanks,
Mike Nelson
T.R | Title | User | Personal Name | Date | Lines
|
---|