How to create an object of File dialog box

Hi all,

I want to create a file dialog box. And I copy a script from FXRuby (by
Lyle J.) as follow:

require ‘fox16’
include Fox

dialog=FXFileDialog.new(self,“Open Files”) #line 4
dialog.patternList=[
“All Files ()",
"JPEG Files(
.jpg,*jpeg)”
]

dialog.selectMode=SELECTFILE_EXISTING
if dialog.execute!=0
open_jpeg_file(dialog.filename)
end

Ruby complains at line 4:

ruby dialogFiles1.rb
c:/ruby/lib/ruby/gems/1.8/gems/fxruby-1.6.16-x86-mswin32-60/lib/fox16/kwargs.rb:789:in
old_initialize': No matching function for overloaded 'new_FXFileDialog' (ArgumentError) from c:/ruby/lib/ruby/gems/1.8/gems/fxruby-1.6.16-x86-mswin32-60/lib/fox16/kwargs.rb:789:ininitialize’
from dialogFiles1.rb:4:in `new’
from dialogFiles1.rb:4

I wonder what I miss?

Thanks,

Li