|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 2153 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 2153.
Report 2153 Actions
Problem Report Number 2153 Submitter's Classification Test Suite problem State Resolved Resolution Rejected (REJ) Problem Resolution ID REJ.X.0620 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 vsm4/tset/widgets/XmList4 test4A Problem Summary PG4M.00016 This report is asking waiver for this kind of error: TEST: ListAddMode ERROR: Received unexpected callback(s) XmNextendedSelectionCallback of widget Xm List of class xmListWidgetClass Received 1, Expe... Problem Text
This report is asking waiver for this kind of error:
TEST: ListAddMode
ERROR: Received unexpected callback(s) XmNextendedSelectionCallback of widget Xm
List of class xmListWidgetClass Received 1, Expected 0
The above error happens in iteration 33, 37, 41, 45. This error is
caused by test suite fault.
Here is the stack sequence to reach the error:
(*testWidgetClassInfo->proc_TestBehavior)
(testWidgetClassInfo, parentWidgetInfo);
(It is in ../vsm4/tset/widgets/list.c test4A)
It calls function :
static void TestBehavior(widget_class_info, parent_info)
MvsWidgetClassInfo *widget_class_info;
MvsWidgetInfoRecord *parent_info;
{
for( i = start ; i < end ; i++ ) {
mvsListBehaviorSet(widget_class_info,parent_info,focus_mode,
args,nargs, i+1);
}
(Above function TestBehavior defined in ../vsm4/src/mvslib/instances/iList.c,
If you just want to test some iteration, in above function change the
for-statement to be, for example:
for( i = 32; i<33; i++) {
instead of
for( i = start ; i < end ; i++ ) {
)
Function mvsListBehaviorSet is defined in
function is:
tn[2] = 66 ; /* test case number */
tresult = 0 ;
msg_prep("Click KeyAddMode on Item 2");
mvsListClearSelectedItems(List_info) ;
XmListSetAddMode(List_info->widget, False ) ;
xisMovePointerTo(List_info->widget, oListItem, 2, MoveAny);
mvsClearCallbacks();
xisClickKey(KeyosfAddMode);
if ((mvsGetLocalResource(List_info, XmNselectionPolicy)) ==
XmEXTENDED_SELECT) {
#ifdef MOTIF_20
if(List_info->widget_class_info == iXmScrolledListWidgetClass) {
mvsListPrepCbacks(List_info, ItemList[6], 7, XmINITIAL);
}
else
#endif /* MOTIF_20 */
mvsListPrepCbacks(List_info, ItemList[3], 4, XmINITIAL);
}
else {
mvsListPrepCbacks(List_info, ItemList[2], 3, XmINITIAL);
}
tresult += mvsCheckCallbacksAndVisual(List_info);
mvsTestVerify(tresult,3,tn) ;
xisMovePointerTo(Null_widget, oUserDefined, 0, MoveLeft);
In the above test case, this if-statement is true:
if ((mvsGetLocalResource(List_info, XmNselectionPolicy)) ==
XmEXTENDED_SELECT)
Now let's go to function "xisClickKey(KeyosfAddMode);", it is defined
in ../vsm4/src/xislib/primitives/ClickKey.c. In this file, around line 230,
here is the code:
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;
}
In above code, this line:
(*current_object->proc_InformExpectedActions)
(xisInform.event_code);
call function SetExpectedActions which is defined in
reached here in function SetExpectedActions(around line 834):
if (( xisIsActiveKey(KeyosfAddMode)) &&
((mvsGetLocalResource(mvs_w_info, XmNancestorSensitive) != FALSE) )
&&
((mvsGetLocalResource(mvs_w_info, XmNsensitive) != FALSE) ) ) {
if ((mvsGetLocalResource(mvs_w_info, XmNselectionPolicy) == XmBROWSE
_SELECT)) {
mvsExpect1MoreCallback(mvs_w_info,XmNbrowseSelectionCallback,
XmCR_BROWSE_SELECT) ;
}
mvsAssertion(mvs_w_info, "ListAddMode");
mvsDebugAssert(mvs_w_info,"ListAddMode 0) ;
}
If you add this statement inside the first if-statement which is the
outside if-statement in above block:
msg_prep("Reached SetExpectedActions, condition KeyosfAddMode is true");
you will see the above assertion will show in the journal file which means we
reached inside the first if-statement.
Functional call mvsCheckCallbacksAndVisual is where we find this error
occurs, the reason lays in List.c of Xm lib, here I describe it:
Here is the info about resource "ListAddMode"
static XtActionsRec ListActions[] =
{
{"ListAddMode", KbdToggleAddMode},
}
Function KbdToggleAddMode will call funciton XmListSetAddMode, both
function defined in List.c of Xm lib. Function XmListSetAddMode call function
ClickElement which is not correct here, here is the code in function
XmListSetAddMode:
if ((add_mode) &&
(lw->list.itemCount != 0) &&
(lw->list.SelectionPolicy == XmEXTENDED_SELECT) &&
(lw->list.selectedItemCount == 1) &&
(lw->list.InternalList[lw->list.CurrentKbdItem]->selected))
{
lw->list.InternalList[lw->list.CurrentKbdItem]->selected = FALSE;
lw->list.InternalList[lw->list.CurrentKbdItem]->last_selected = FALSE;
DrawList(lw, NULL, TRUE);
ifndef OSF_v1_2_4
ClickElement(lw, NULL,FALSE);
else /* OSF_v1_2_4 */
UpdateSelectedList(lw);
endif /* OSF_v1_2_4 */
}
What we need to do is to change this line of code at above
ClickElement(lw, NULL,FALSE);
to:
UpdateSelectedList(lw);
And this change will fix the failure in our test case.Review Information
Review Type TSMA Review Start Date null Completed null Status Complete Review Recommendation No Resolution Given Review Response
In interation 33 of this test purpose, during the test of ListAddMode,
XmNselectionPolicy is set to XmEXTENDED_SELECT, no items are selected,
AddMode is set to false, and XmNAutomaticSelection is false.
The Motif Toolkit API specification for XmList states on pages 376 - 377 that:
"All selection operations available from the mouse are also available
from the keyboard. List has two keyboard selection modes, Normal Mode
and Add Mode. In Normal Mode, navigation operations and KSelect select
the item at the location cursor and deselect any other selected
items. In Add Mode, navigation operations have no effect on selection,
and KSelect toggles the selection state of the time at the location
cursor without deselecting any other selected items, except in
Single Select."
"Single and Multiple Select use Add Mode; Browse Select uses Normal Mode."
"Extended Select can use either mode; the user changes mode by pressing
KAddMode. In Extended Select Normal Mode, pressing KSelect has the same
effect as pressing BSelect; KExtend and shifted navigation have the
same effect as pressing BExtend following a BSelect action. In Extended
Select Add Mode, pressing KSelect has the same effect as pressing
BToggle; KExtend and shifted navigation have the same effect as pressing
BExtend following a BToggle action."
On page 378, regarding the XmNautomaticSelection resource for XmList, the
specification states:
"XmNautomaticSelection invokes either XmNBrowseSelectionCallback or
XmNextendedSelectionCallback when BSelect is pressed and the items that
are shown as selected change if the value is True and the selection mode
is either XmBROWSE_SELECT or XmEXTENDED_SELECT respectively. If False,
no selection callbacks are invoked until the user releases the mouse button ..."
On page 378, for the XmNextendedSelectionCallback:
"XmNextendedSelectionCallback specifies a list of callbacks called when
items are selected using the extended selection mode ..."
On page 382, regarding the ListAddMode() action routine:
"ListAddMode() toggles the state of Add Mode for keyboard selection"
The Motif Toolkit API specification does not state or imply that toggling
the AddMode of an XmList widget in extended selection mode by use of the
KAddMode key should invoke the callbacks registered with the
XmNextendedSelectionCallback resource. The test suite is correct in
this expectation. We therefore recommend that this waiver request be denied.
Review Type SA Review Start Date null Completed null Status Complete Review Resolution Rejected (REJ) Review Conclusion
--41c6_167e-2781_446b-794b_15fb--
Problem Reporting System Options:
- View Report 2153
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority