That's cool botp but I'm trying to not use any external gem rather than
FXRuby gem, if I include Tk plus all the gems that I'm using for my
project(roo, win32ole, etc..) the final pack will be big and I don't
think that the fusion between both frameworks will be nice for the user,
I mean FXRuby widgets are pretty differents that the Tk ones. The
problem with the dialog in FXRuby is that its in English, I'm developing
an Spanish language app, so I can not pop up a dialog in English
expecting that the user will understand what said there. The solution
for me will be if I can pop up the "open" file dialog of Windows(I'm
developing just for windows). Of course I can create my own widget for
file opening but you know, everything takes time, and now I'm running
low, need the help you all can give me, thanks.
It is completely in english, as I said, the app is in spanish language.
Was wondering if I can save time using the windows open file dialog
instead of develop a new widget like the one you showed, I'm trying to
make a professional app so I don't want for example that the button
'cancel' say 'cancel' in it, it must be 'cancelar', spanish...
Trying your example on Windows 7 Ruby 1.9.3 I get
Win32_Test.rb:3:in `initialize': unknown OLE server:
`MSComDlg.CommonDialog' (WIN32OLERuntimeError)
This suggests that component is not installed on my machine. Even if it was
installed, Google suggests there would be a Microsoft component licensing
issue:
GetOpenFileName() is deprecated but is probably easier to use than the
alternative. However, it will involve packing the OPENFILENAME members, as
in the example I linked to at the start of my email.
Feliz Navidad,
Kieran
···
On Mon, Dec 24, 2012 at 8:37 PM, Damián M. González <lists@ruby-forum.com>wrote:
Hi guys, been researching about pop up the "open" file dialog of
Windows. I didn't find nothing, just a snippet of code that doesn't
work:
It is completely in english, as I said, the app is in spanish language.
Was wondering if I can save time using the windows open file dialog
instead of develop a new widget like the one you showed, I'm trying to
make a professional app so I don't want for example that the button
'cancel' say 'cancel' in it, it must be 'cancelar', spanish...
Doesn't the windows dialog correspond to the language currently in use
in the operating system?
I'd suggest looking into how that dialog is created and whether it's
possible to change the source to something more suitable for your
project.
Well, FXRuby is basically a wraper to the C++ Fox framework, so the
pre-mades widgets are in some way hidden in C++ code, as I can't
interpret C++ code I can't do nothing. What I can do is combine a group
of widgets until that groups becomes a sort of "file open dialog", but
I'm trynig to avoid that because it takes time, and am low of it.
Have you tried asking the "Spanish Rails Group" on here? Someone there
might have already solved this problem.
That's a good recomendation! I think is even better ask in the Ruby on
Rails group since this is a global question, not explicit to some
language. Thank you Joel.
Long answer:
It would have been helpful to include the error message and the Windows
and
Ruby software versions you are using. See How To Ask Questions The Smart Way
Trying your example on Windows 7 Ruby 1.9.3 I get
Win32_Test.rb:3:in `initialize': unknown OLE server:
`MSComDlg.CommonDialog' (WIN32OLERuntimeError)
Same OS and Ruby version.
This suggests that component is not installed on my machine. Even if it
was
installed, Google suggests there would be a Microsoft component
licensing
issue:
Same thing happen to me, I've been in that page. I've tried the
solution but doesn't work for me, seems that the component is not
installed on my machine.
GetOpenFileName() is deprecated but is probably easier to use than the
alternative. However, it will involve packing the OPENFILENAME members,
as
in the example I linked to at the start of my email.
Well, this solution can be a mess, since I've scaped every time that I
looked to the Win32API, it hurst me. Since that finally I have to appeal
to construct the entire widget with FXRuby.
Feliz Navidad,
Kieran
Thank you for taking the time to response. Feliz navidad y año nuevo! Damián.
Doesn't the windows dialog correspond to the language currently in use
in the operating system?
If you mean the #FXFileDialog from FXRuby then NO. I've tested it. If
you mean the "Windows OS open dialog"(I mean the one which say "Open" as
caption in English version and "Abrir" in Spanish version) then it
depends of the language currently in use in the operating system, and
that's what I want... because in this case the app is explicit for a
user which is working in a PC with spanish language.