HomeAbout Us A-Z IndexSearch * Contact Us Register LoginPress Shop

The Open Brand -- Problem Reporting and Interpretations System


Problem Report 2139 Details

Help Show help | Quick Search | Submit a Test Suite Support Request | Click here to view your privileges

This page provides all information on Problem Report 2139.


Report 2139 Actions


    Problem Report Number 2139
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Rejected (REJ)
    Problem Resolution ID REJ.X.0606
    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 funcs/XmListAddItem 1
    Problem Summary PG4M.00002 The spec says: "XmListAddItem adds an item to the list at the given position. When the item is inserted into the list, it is compared with the current XmNselectedItems list. If the new item matches an...
    Problem Text

    The spec says:
    "XmListAddItem adds an item to the list at the given position. When the item
    is inserted into the list, it is compared with the current XmNselectedItems
    list. If the new item matches an item on the selected list, it appears
    selected"
    Similar about XmListAddItems in spec.

    This is the fault of test case.
    The inserting sequence of "ItemList[i]" are:
    0;
    0, 1 ;
    2, 0, 1;
    2, 0, 1, 3;
    2, 0, 0, 1, 3;
    The last item inserted is at position 2 which is the second 0.
    After we inserted the first item which is "ItemList[0]", we highligted
    it, here is the code:
    xisMovePointerTo(w_info->widget, oListItem, 0, MoveAny);
    xisPressMouseButton( NoModifierKeys, Button1 );




    xisReleaseMouseButton( NoModifierKeys, Button1);

    At the fifth insertion step, we inserted "ItemList[0]" again:
    XmListAddItem(w_info->widget, ItemList[0], 3);
    XmListAddItem is defined in List.c of Xm lib.
    Because ItemList[0] has already been highlighted, so we insert it
    again into the list, the new occurance of ItemList[0] will also have to be
    highlighted property, the explanation is at the end of this block.
    so we will get two highted items instead of one, both No. 2 and No. 3 items,
    so the "position_count" got from:

    if (XmListGetSelectedPos(w_info->widget, &position_list, &position_count
    ) == TRUE) {

    Should be 2 instead of 1. So we need to change line 321 of lsaditem.c
    to be:
    if (position_count != 2) {

    And position_list[0] is 2, position_list[1] is 3. So we need change
    line 324 of lsaditem.c to be:
    if (position_list[0] != 2) {

    About the new item' to be highlighted property:
    The code of XmListAddItem to add an item is:
    AddItem(lw, item, intern_pos);
    AddInternalElement(lw, item, pos, OnSelectedList(lw,item), TRUE);

    Function AddInternalElement is also defined in List.c of Xm lib. It has
    those code to define the new added item high-lighted property:
    new_el->selected = selected;
    new_el->last_selected = selected;

    Function OnSelectedList is also defined in List.c of Xm lib. It returns
    true here.

    It's better to see the whole XmListAddItem function code to understand
    this.

    Similar case: XmListAddItems 1.

    Review Information

    Review Type TSMA Review
    Start Date null
    Completed null
    Status Complete
    Review Recommendation No Resolution Given
    Review Response
    We recommend this request be refused.

    The test has failed on the implementation for two conditions. Both of
    these are valid failures.




    The first error:

    "ERROR: Wrong number of selected items. Expected: 1 Observed: 2"

    The list in the test is created with the XmNselectionPolicy resource
    set to the default value which is XmBROWSE_SELECT. The X/Open Motif
    spec for XmList, List widget class, in the Selection section, states
    that when the selection is Browse select, "at most one item is
    selected at a time." The XmListGetSelectedPos function on the
    implementation returns the incorrect value for the selected item count
    in position_count.

    The second error:

    "ERROR: Wrong position of selected item. Expected: 2 Observed: 2"

    The X/Open Motif spec for XmListAddItem states in the Description
    section:

    When an item is inserted into the list, it is compared with
    the current XmNselectedItems list. If the new item matches an
    item on the selected list, it appears selected.

    This indicates that when XmNselectionPolicy is XmBROWSE_SELECT at most
    one item is selected and if an item matching an item that is on the
    list and already selected is added to the list the newly added item
    replaces the previous one as the selected item. Thus, in the test when
    the item 0 is added the second time at the position 3 it replaces the
    item 0 at position 2 as the selected item. The expected position of
    the selected item should be 3.

    The implementation's XmListGetSelectedPos appears to treat both the
    occurrances of item 0 as selected (the first error) and appears to
    return the position of both in the position_list array.

    The above explanations apply to XmListAddItems also.


    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:

     

    Back   


Contact the Certification Authority