|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 2151 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 2151.
Report 2151 Actions
Problem Report Number 2151 Submitter's Classification Test Suite problem State Resolved Resolution Rejected (REJ) Problem Resolution ID REJ.X.0618 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 PG4M.00014 This report is only ask for this kind of error: ERROR: Received unexpected callback(s) XmNhelpCallback of widget XmTemplateDialo g of class xmMessageBoxWidgetClass Received 1, Expected 0 The above err... Problem Text
This report is only ask for this kind of error:
ERROR: Received unexpected callback(s) XmNhelpCallback of widget XmTemplateDialo
g of class xmMessageBoxWidgetClass Received 1, Expected 0
The above error is because of the fault of test suite.
/********************************************************************/
The reason of failure here is the test case think the keyboard FOCUS
is on XmTemplateDialog widget, but actually the test suite set the
keyboard FOCUS on XmTemplateDialog_popup widget, and this cause the failure.
/*******************************************************************/
The stack sequence to reach above error is:
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
mvsBoxBehaviorSet(widget_class_info,parent_info,focus_mode,
args,nargs, i+1);
"mvsBoxBehaviorSet" function is defined in ../mvslib/behavior/Box.c.
Here we failed, for example:
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);
/********************************************************************/
The reason of failure here is the test case think the keyboard FOCUS
is on XmTemplateDialog widget, but actually the test suite set the
keyboard FOCUS on XmTemplateDialog_popup widget, and this cause the failure.
/*******************************************************************/
We use the following code at above block to get the focus at first:
" mvsSetFocus(Box_widget, oUserDefined, 0, focus_mode); "
"mvsSetFocus" is defined in ../vsm4/src/mvslib/other/SetFocus.c.
Here "focus_mode" is "TRUE"(defined in ../src/mvslib/instances/TemplateD.c,
not changed during this test process). "mvsSetFocus" calls "xisSetKeyboardFocus"
which is defined in ../src/xislib/primitives/SetFocus.c.
Look at ../src/xislib/primitives/SetFocus.c, here is the code for
XmTemplateDialog widget to get the keyboard focus:
....................................................
if(object->visibility_state & IsViewable) {
XSetInputFocus(xisDisplay,XtWindow(xisGetShellWidget(widget)),
RevertToNone,CurrentTime);
}
....................................................
You can put such code after above code to check the focus:
msg_failure("xisSetKeyboardFocus: 1, focus_widget is %s 0,
XtName(xisState.focus_widget) );
/* output to journal file */
or:
printf("xisSetKeyboardFocus: 1, focus_widget is %s 0,
XtName(xisState.focus_widget) );
But this function call XmProcessTraversal changes keyboard FOCUS to
XmTemplateDialog_popup. You can use above printf to check the result to
confirm if you like at the end of this ../src/xislib/primitives/SetFocus.c.
Now go back to the block in ../mvslib/behavior/Box.c where we failed.
In this block, after "mvsSetFocus(Box_widget, oUserDefined, 0, focus_mode);",
it will reach the else-part:
xisMovePointerTo(Box_widget, oUserDefined, 0, MoveAny);
This above line code won't change keyboard focus at all, you can use
printf to check xisState.focus_widget around above line of code.
Then we execute those 2 lines in ../mvslib/behavior/Box.c:
mvsClearCallbacks();
xisClickKey(KeyosfHelp);
"mvsClearCallbacks();" will clear all the callback records.
"xisClickKey(KeyosfHelp);" will set the expected callbacks and then
click key "KeyosfHelp" to generate the callbacks. Here in fact the keyboard
focus is on XmTemplateDialog_popup, not on XmTemplateDialog, so that at this
code in function xisClickKey(../src/xislib/primitives/ClickKey.c)
.........................................................
if (current_object->proc_InformExpectedActions != NULL) {
xisInform.current_obj = current_object;
(*current_object->proc_InformExpectedActions)
(xisInform.event_code);
}
........................................................
Instead of setting the expected callbacks of XmTemplateDialog(in file
in fact setting the expected callbacks of XmTemplateDialog_popup( in file
pointer is still focused on XmTemplateDialog, so this cause a failure.
We could get around with this problem by adding a if-condition in
file ../src/mvslib/other/SetFocus.c just before XmProcessTraversal to bypass
this XmProcessTraversal if the widget is XmTemplateDialog.Review Information
Review Type TSMA Review Start Date null Completed null Status Complete Review Recommendation No Resolution Given Review Response
The submitter is correct but a recent ruling regarding this issue
exists. To avoid the confusion duplicate rulings regarding the same
issue might cause we recommend this request be refused and the submitter
use TSD4M.00009 instead.
To clarify the errors, here is what is happening in the tests.
Error 1: "Didn't receive expected XmNmapCallback callback"
The submitter's analysis of the problem is not accurate. Indeed when the
TemplateDialog widget was created, realized, and managed the widget
was mapped. But that was not the reason for the test failure. The test
prior to the "map" test was the "unmap" action which had no error checking.
This unmap of the widget was failing due to code being placed under Motif 2.0
requirement. This code which was in src/mvslib/resources/mvsSetUpGlob.c sets
up the resources for the "Ok", "Help" and the "Cancel" buttons on the
TemplateDialog widget. The test uses the "Cancel" button to unmap the widget.
Error 2: "Received unexpected callback(s) XmNhelpCallback"
Here again the problem was due to the code needed for 1.2 test being
placed along with the 2.0 code. The callback for the Help button was not
being set. The absence of the dummy callback for XmTemplateDialog_popup which
was the widget actually receiving the focus resulted in the callback being
reported for the TemplateDialog widget.
Review Type SA Review Start Date null Completed null Status Complete Review Resolution Rejected (REJ) Review Conclusion
This request is refused.
Problem Reporting System Options:
- View Report 2151
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority