C/Motif code works on SunOS, not Linux

Posted on 2006-03-30
Last Modified: 2010-04-22
Any idea why the following code runs correctly on SunOS but not on Linux? When running under Linux the filter for the File Selection Box simply doesn't give any files. A simply filter string such as *.pat* works OK, but not the more complicated case here. I'm running Redhat 2.4.21-27.

static Widget pat_file_dialog;

  if (pat_file_dialog == NULL) {
    XmString pat_filter = XmStringCreateLocalized ("*.(pat*|epat*)");
    pat_file_dialog = XmCreateFileSelectionDialog (toplevel, "open_pat", NULL, 0);
    XtVaSetValues (pat_file_dialog,
               XmNdialogTitle, XmStringCreateLocalized ("Select Pat(e) File to Display"),
    XtAddCallback (pat_file_dialog, XmNokCallback, open_pat_cb, NULL);
    XtAddCallback (pat_file_dialog, XmNcancelCallback, popdown_cb, (XtPointer)0);
    XtUnmanageChild (XmFileSelectionBoxGetChild (vcd_file_dialog, XmDIALOG_HELP_BUTTON));
    XmFileSelectionDoSearch (pat_file_dialog, pat_filter);
    XmStringFree (pat_filter);
  XtManageChild (pat_file_dialog);

Question by:jimdgar
    1 Comment
    LVL 34

    Accepted Solution

    Motif didn't use to be free and didn't generally come with Linux distros. Maybe you have LessTiff (which is free). Maybe you have found a defect in it. OTOH if you don't have LessTiff, maybe you should try it. Sorry, I'm not really an X programmer (ony Tk) so I'm just putting out some ideas.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    Suggested Solutions

    The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
    The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now