Forum: JRuby awt.FileDialog.set_filename_filter doesn't work

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Bec38d63650c8912b6ba9b557fb953b9?d=identicon&s=25 Roger Pack (rogerdpack)
on 2012-05-16 21:22
Anybody have any ideas why my "filename filter" doesn't appear to get
called here?

require 'java'
java_import java.awt.FileDialog
    out =, "title", FileDialog::LOAD)
      out.set_filename_filter {|file, name|
    puts 'hello' # never reached
Thomas E Enebo (Guest)
on 2012-05-16 22:03
(Received via mailing list)
This works for me (master and 1.6.7) and prints out the same number of
'hello' as the current director seems to have files.   The dialog may
not print anything if it remembers a previous directory which contains
no files/dirs.  When mine pops up it is in a weird directory
(MacOS...I wonder where last dir is stored...).  Perhaps that is the


On Wed, May 16, 2012 at 2:22 PM, Roger Pack <>
> --
> Posted via
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:

blog:   twitter: tom_enebo
Bec38d63650c8912b6ba9b557fb953b9?d=identicon&s=25 Roger Pack (rogerdpack)
on 2012-05-23 18:15
yes I think it may have been a default directory thing because when I
took the same code to a different (OS and machine), it seemed to start
working. Weird.
This topic is locked and can not be replied to.