|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 2184 Details
Show help | Quick Search | Submit a Test Suite Support Request | Click here to view your privileges
This page provides all information on Problem Report 2184.
Report 2184 Actions
Problem Report Number 2184 Submitter's Classification Test Suite problem State Resolved Resolution Test Suite Deficiency (TSD) Problem Resolution ID TSD.X.1103 Raised 1970-01-01 08:00 Updated 2003-03-13 08:00 Published null Product Standard Motif Toolkit Certification Program The Open Brand certification program Test Suite VSM version 4.0.0 Test Identification widgets/XmTemplateDialog 4 Problem Summary TSD4M.00009 This is the test suit fault. X/Open Waiver Reference: TSD4M.00009 Page: 1 WAIVER DOCUMENT X/Open Waiver Reference: TSD4M.00009 TO EXPLAIN "Didn't receive expected XmNmapCallback callback": The test c... Problem Text
This is the test suit fault.
X/Open Waiver Reference: TSD4M.00009 Page: 1
WAIVER DOCUMENT X/Open Waiver Reference: TSD4M.00009
TO EXPLAIN "Didn't receive expected XmNmapCallback callback":
The test case is in vsm4/tset/widgets/templated.c. It has code:
(*testWidgetClassInfo->proc_TestBehavior) (testWidgetClassInfo,
parentWidgetInfo);
/* Here: testWidgetClassInfo=iXmTemplateDialogWidgetClass; same
file, open_func() */
So we go to function TestBehavior in file
vsm4/src/mvslib/instances/TemplateD.c. In this function, call:
mvsBoxBehaviorSet(widget_class_info,parent_info,focus_mode,
args,nargs, i+1);
"mvsBoxBehaviorSet" function is defined in ../mvslib/behavior/Box.c.
Here we failed:
tn[2] = 1 ; tresult = 0 ;
msg_prep("Map");
mvsSetFocus(Box_widget, oUserDefined, 0, focus_mode);
mvsClearCallbacks();
xisMapWidget(Box_info->widget);
if(class_code == mvsXmFileSelBoxWidgetClass) {
mvsFileSelPrepCbacks(Box_info);
}
tresult += mvsCheckCallbacksAndVisual(check_info);
mvsTestVerify(tresult,3,tn) ;
xisMovePointerTo(Null_widget, oUserDefined, 0, MoveAny);
xisMapWidget is defined in vsm4/src/xislib/primitives/MapWidget.c,
here we set the expected callback, we expected a XmNmapCallback callback
which is not true:
(*current_object->proc_InformExpectedActions)(EventMap);
current_object is focused in XmTemplateDialog widget.
In this same file Box.c somewhere(line 218) we have:
Box_info = mvsCreateWidget( widget_class_info, parent_info,
UseCommonArgs, args, n);
Box_widget = Box_info->widget;
In the above function "mvsCreateWidget" we create and realize the
Box_widget, all these happened well before mvsClearCallbacks() so that
we cannot expect a XmNmapCallback callback since you cannot map a realized
widget again(the default map value for XmTemplateDialog widget is "mapped
when realized").
For "mvsCreateWidget", it is defined in vsm4/src/mvslib/widgets/
mvsCreateWid.c, it calls mvsCreateManageWidget function which is defined
in the same file. In mvsCreateManageWidget function:
/* Create actual widget */
widget_info->widget = (*widget_class_info->proc_CreateWidget)
(parent_info->widget,args,nargs);
X/Open Waiver Reference: TSD4M.00009 Page: 2
WAIVER DOCUMENT X/Open Waiver Reference: TSD4M.00009
if (widget_info->widget == NULL) {
msg_error("<mvsCreateWidget> NULL widget pointer");
return(NULL);
}
widget_info->window = 0;
XtRealizeWidget(widget_info->widget);
/* Manage widget if it is not a Shell */
if((parent_info != mvsRootWidgetInfo) && (manage == TRUE))
XtManageChild (widget_info->widget);
/$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$/
TO EXPLAIN "Received unexpected callback(s) XmNhelpCallback":
Reference above explanation to reach function mvsBoxBehaviorSet. Here
I explain specificaly for one case, all rest are same.
At line 531: xisClickKey(KeyosfHelp), the code around here is:
/********************************************************************/
tn[2] = 17 ; tresult = 0 ;
msg_prep("Click KHelp over manager");
mvsSetFocus(Box_widget, oUserDefined, 0, focus_mode);
#ifdef MOTIF_20
if((widget_class_info == iXmCommandWidgetClass) ||
(widget_class_info == iXmCommandDialogWidgetClass)) {
#else
if ((widget_class_info == iXmCommandWidgetClass)) {
#endif /* MOTIF_20 */
xisMovePointerTo(Box_widget, oSelectionText, 0, MoveAny);
xisPressMouseButton(Btn1);
xisReleaseMouseButton(Btn1);
}
else
xisMovePointerTo(Box_widget, oUserDefined, 0, MoveAny);
mvsClearCallbacks();
xisClickKey(KeyosfHelp);
if(class_code == mvsXmCommandWidgetClass) {
mvsCommandPrepCbacks(Box_info, XvNenteredvalue);
}
if(class_code == mvsXmFileSelBoxWidgetClass) {
mvsFileSelPrepCbacks(Box_info);
}
tresult += mvsCheckCallbacksAndVisual(check_info);
mvsTestVerify(tresult,3,tn) ;
xisMovePointerTo(Null_widget, oUserDefined, 0, MoveAny);
/************************************************************************/
xisClickKey(KeyosfHelp) function is defined in vsm4/src/xislib/
X/Open Waiver Reference: TSD4M.00009 Page: 3
WAIVER DOCUMENT X/Open Waiver Reference: TSD4M.00009
primitives/ClickKey.c, in this function it suppose to set the expected
XmNhelpCallback callback of widget XmTemplateDialog, but in fact it doesn't
set it up. The reason is the current focus widget is not XmTemplateDialog,
actually is XmTemplateDialog_popup(parent of XmTemplateDialog). Check
xisClickKey function, it has such code to inform expected callback(s) to
related widgets:
while (current_object != NULL) {
if (current_object->proc_InformExpectedActions != NULL) {
xisInform.current_obj = current_object;
(*current_object->proc_InformExpectedActions)
(xisInform.event_code);
}
current_object = current_object->parent;
}
If you put such code in the if block of above while-loop to wrap the function
*current_object->proc_InformExpectedActions and put some printf at the very
beginning of function SetExpectedActions in file vsm4/src/mvslib/instances/
TemplateD.c, it will be very clear. The code is:
printf("ClickKey.c: *current_object->proc_InformExpectedActions, 1 0);
printf("focus widget is %s 0, XtName(current_object->id.widget));
/* before proc_InformExpectedActions */
printf("ClickKey.c: *current_object->proc_InformExpectedActions, 2 0);
/* after proc_InformExpectedActions */
Reason: function xisSetKeyboardFocus in file xislib/primitives/SetFocus.c called
by function mvsSetFocus doesn't set the focus right. Put such printf before the
if statement(line 173):
printf("Before if block, widget is %s 0, XtName(xisState.focus_widget));
if(!XmProcessTraversal(widget,XmTRAVERSE_CURRENT) &&
and put this printf at the end of above if part(line 186):
printf("if part: new_focus widget is %s0,XtName(xisState.focus_widget));
From the output you will see at the above printfs for our case, the first
printf outputs XmTemplateDialog widget, the second printf outputs
XmTemplateDialog_popup widget.Review Information
Review Type SA Review Start Date null Completed null Status Complete Review Resolution Test Suite Deficiency (TSD) Review Conclusion
This is an agreed Test Suite Deficiency.
Problem Reporting System Options:
- View Report 2184
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority