Anybody have any ideas why my “filename filter” doesn’t appear to get
called here?
require ‘java’
java_import java.awt.FileDialog
out = FileDialog.new(nil, “title”, FileDialog::LOAD)
out.set_filename_filter {|file, name|
puts ‘hello’ # never reached
}
out.show
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
issue?
-Tom
On Wed, May 16, 2012 at 2:22 PM, Roger P. [email protected]
wrote:
out.show
–
Posted via http://www.ruby-forum.com/.
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
–
blog: http://blog.enebo.com twitter: tom_enebo
mail: [email protected]
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.