XmFileSelectionDoSearch - Motif

This is a discussion on XmFileSelectionDoSearch - Motif ; I want to use XmFileSelectionDoSearch to mimic the effect of the user pressing "Filter" when a file selection dialogue (which has been used before) is popped up. My (slightly uncertain) reading of the documentation and of the OpenMotif code is ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: XmFileSelectionDoSearch

  1. XmFileSelectionDoSearch

    I want to use XmFileSelectionDoSearch to mimic the effect of the user
    pressing "Filter" when a file selection dialogue (which has been used
    before) is popped up. My (slightly uncertain) reading of the documentation
    and of the OpenMotif code is that the right thing to do is to provide NULL
    for the second parameter (dirmask). This seems to work on the systems I'm
    testing against. Am I just being lucky, or is this behaviour guaranteed?

    Regards,

    Rob.


  2. Re: XmFileSelectionDoSearch



    Rob Arthan wrote:
    >
    > I want to use XmFileSelectionDoSearch to mimic the effect of the user
    > pressing "Filter" when a file selection dialogue (which has been used
    > before) is popped up. My (slightly uncertain) reading of the documentation
    > and of the OpenMotif code is that the right thing to do is to provide NULL
    > for the second parameter (dirmask). This seems to work on the systems I'm
    > testing against. Am I just being lucky, or is this behaviour guaranteed?
    >
    > Regards,
    >
    > Rob.


    The documentation for this function does not really state what should
    happen if NULL is passed. As of Motif2.1, if NULL is passed, the filter
    used is obtained from the string currently residing in the filter text
    box. Presumably this will never be changed in any future release.

    A simple way to guarantee that the current filter will be honored is:
    XtVaGetValues( w, XmNdirMask, &xmsDirMask, NULL ) ;
    XmFileSelectionDoSearch( w, xmsDirMask) ;
    XmStringFree( xmsDirMask ) ;

    However, as the code now stands this is not necessary.
    --
    Fred L. Kleinschmidt
    Boeing Associate Technical Fellow
    Technical Architect, Common User Interface Services
    M/S 2R-94 (206)544-5225

+ Reply to Thread