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

The Open Brand -- Problem Reporting and Interpretations System


Problem Report 2172 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 2172.


Report 2172 Actions


    Problem Report Number 2172
    Submitter's Classification Specification problem
    State Resolved
    Resolution Temporary Interpretation (TIN)
    Problem Resolution ID TIN.X.0112
    Raised 1970-01-01 08:00
    Updated 2003-03-13 08:00
    Published 1998-04-20 08:00
    Product Standard Motif Toolkit
    Certification Program The Open Brand certification program
    Test Suite VSM version 4.0.0
    Test Identification functions/XmTextSetSource 1
    Specification Motif Toolkit API
    Location in Spec See Problem Text
    Problem Summary TIN4M.00019 The reference implementation (i.e. The Motif code provided by TOG) being tested is not in line with the standard specification for this Motif function as defined in the "X/Open Motif Toolkit API". The...
    Problem Text
    The reference implementation (i.e. The Motif code provided by TOG) being

    tested is not in line with the standard specification for this Motif
    function as defined in the "X/Open Motif Toolkit API".
    The assertion being tested is in line with the standard specification
    but the behavior of this function is not in line with the specification.

    Either the Motif reference implementation is at fault, or the
    Specification needs to be aligned with the reference implemenation. It
    is our understanding that Motif 1.2.X is no longer supported by TOG,
    hence we request this waiver be granted a Permanent Interpretation.

    The description of "top_character" in the specification is as follows:

    "Specifies the position in the text to display at the top of the widget.

    This is an integer number of characters from the beginning of the text
    buffer. The first character position is 0 (zero)."

    To explain the reason for the error messages we need to take a look at
    what the code for XmTextSetSource() is doing.

    The code for XmTextSetSource() unconditionally calls the Scan() private
    function which accepts a top_character and returns a new top_character.

    void
    #ifdef _NO_PROTO
    XmTextSetSource( widget, source, top_character, cursor_position )
    Widget widget ;
    XmTextSource source ;
    XmTextPosition top_character ;
    XmTextPosition cursor_position ;
    #else
    XmTextSetSource(
    Widget widget,
    XmTextSource source,
    XmTextPosition top_character,
    XmTextPosition cursor_position )
    #endif /* _NO_PROTO */
    {
    XmTextWidget tw = (XmTextWidget) widget;
    .
    top_character = (*tw->text.source->Scan)(tw->text.source,
    top_character,
    XmSELECT_LINE, XmsdLeft, 1,
    FALSE);
    .




    }

    To understand the purpose of the Scan() function we need to look at the
    documentation for XmTextSetTopCharacter() which states.

    "XmTextSetTopCharacter() sets the position of the text at the top of the

    Text widget. If the XmNeditMode is XmMULTI_LINE_EDIT, the line of text
    that
    contains top_character is displayed at the top of the widget without
    the text shifting left or right."

    Thus, if we examine the code for the Scan() function we see that it
    looks
    for the line containing the "top_character" and returns the position of
    the
    FIRST character on that line. This is why we get the following error
    messages:

    520|1235 1 8789 1 9|ERROR: Incorrect top character in widget 2.
    Expected: 5
    Observed: 0
    520|1235 1 8789 1 11|ERROR: Incorrect top character in widget 1.
    Expected: 3
    Observed: 0
    520|1235 1 8789 1 12|ERROR: Incorrect top character in widget 2.
    Expected: 5
    Observed: 0

    Since the documentation for XmTextSetSource() says nothing about
    checking
    the XmNeditMode then either the unconditional call to the Scan()
    function must
    be removed completely, or the Scan() function should only be called if
    the
    XmNeditMode is XmMULTI_LINE_EDIT and the documentation updated to
    reflect this.
    This would then be consistent with the documentation for
    XmTextSetTopCharacter().

    Please note that in Motif 2.1 the call to the Scan() function in
    XmTextSetSource()

    top_character = (*tw->text.source->Scan)(tw->text.source,
    top_character,
    XmSELECT_LINE, XmsdLeft, 1,
    FALSE);

    has been replaced with

    if (tw->text.edit_mode == XmMULTI_LINE_EDIT)
    top_character = (*tw->text.source->Scan)(tw->text.source,




    top_character,
    XmSELECT_LINE, XmsdLeft, 1,
    FALSE);

    Test Output
    520|1235 1 8789 1 1|VSM4TESTSUITE PURPOSE 1
    520|1235 1 8789 1 2|A call to void XmTextSetSource(Widget widget,
    520|1235 1 8789 1 3|XmTextSource source, XmTextPosition top_character,
    520|1235 1 8789 1 4|XmTextPosition cursor_position) shall set the source

    520|1235 1 8789 1 5|of the Text widget specified by widget to the source

    520|1235 1 8789 1 6|source.
    520|1235 1 8789 1 7|PREP: Create a Text widget
    520|1235 1 8789 1 8|TEST: Set a widget source
    520|1235 1 8789 1 9|ERROR: Incorrect top character in widget 2.
    Expected: 5
    Observed: 0
    520|1235 1 8789 1 10|TEST: Use the source from a third widget
    520|1235 1 8789 1 11|ERROR: Incorrect top character in widget 1.
    Expected: 3
    Observed: 0
    520|1235 1 8789 1 12|ERROR: Incorrect top character in widget 2.
    Expected: 5
    Observed: 0
    220|1235 1 1 18:10:06|FAIL




    Review Information

    Review Type TSMA Review
    Start Date null
    Completed null
    Status Complete
    Review Recommendation No Resolution Given
    Review Response
    A non-alignment between the reference code and its specification is
    under investigation. Thus it is recommended that a Temporary
    Interpretation be granted for this test while it remains subject to review.
    If a change to the specification results from the conclusion of this
    investigation, then this Temporary Interpretation will be converted
    to a Permanent Waiver. Otherwise this Temporary Interpretation will
    be converted to a Temporary Waiver (Minor System Fault).


    Review Type SA Review
    Start Date null
    Completed null
    Status Complete
    Review Resolution Temporary Interpretation (TIN)
    Review Conclusion
    A Temporary Interpretation is granted.


    Problem Reporting System Options:

     

    Back   


Contact the Certification Authority