Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4719663

FileDialog in linux does not respond to filtering

XMLWordPrintable

    • x86
    • linux



      Name: dk106046 Date: 07/24/2002

      Standard Edition build 1.4.0-rc-b91

      Occurs on all Unix platforms.
        
      Open a file dialog, put "*.class" in the filter field, then hit update - nothing happens.

      The 1.4 code in awt_FileDialog.c adds a new callback to handle filtering called ourSearchProc, which calls back into java to do the filtering, passing the directory as a base point.
      However, the FileNameFilter which is stored in the java end has never been initialized in any JVM yet, so the filtering is not working.
      I would suggest that as well as passing the 'dir' field to the java method proceedFiltering, you could also pass the filter field got from:

       XmStringGetLtoR(vals->pattern, XmFONTLIST_DEFAULT_TAG, &pattern);

      ...and use that to initialize the FilenameFilter in java before filtering.

      In IBM's jvm, I could not see any reason why it is necessary to do our own filtering, so I have commented out the installation of ourSearchProc, and gone back to the 1.3.1 implementation.

      ======================================================================

            Unassigned Unassigned
            dkorbel David Korbel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: