Hello I tried to put together a test application that opens a file. Unfortunately, the line with GLib::File.read returns: fdialog.rb:16:in `filechooserbutton1_file_set_cb': uninitialized constant GLib::File I use require 'libglade2' require 'glib2' what do I need to read a file? Where can I find the required library for an object like GLib::File? The page http://ruby-gnome2.sourceforge.jp/hiki.cgi?GLib%3A%3AFile does not state requirements. Thanks Michal
on 2011-06-06 19:21
on 2011-06-06 20:56
Subject: [ruby-gnome2-devel-en] problem with using GLib::File Date: lun 06 giu 11 07:20:12 +0200 Quoting Michal Suchanek (hramrach@centrum.cz): > require 'glib2' > > what do I need to read a file? The File class is included in the default Ruby library, not in Glib. You must use File in place of GLib::File if you want your program to access files. Carlo -- * Se la Strada e la sua Virtu' non fossero state messe da parte, * K * Carlo E. Prelz - fluido@fluido.as che bisogno ci sarebbe * di parlare tanto di amore e di rettitudine? (Chuang-Tzu)
on 2011-06-07 09:07
On 6 June 2011 20:29, Carlo E. Prelz <fluido@fluido.as> wrote: >> constant GLib::File > You must use File in place of GLib::File if you want your program to > access files. > > Carlo > Then my program won't be able to access my files because they are only reachable through gvfs. Thanks Michal
on 2011-06-07 12:26
On 7 June 2011 09:07, Michal Suchanek <hramrach@centrum.cz> wrote: >>> fdialog.rb:16:in `filechooserbutton1_file_set_cb': uninitialized >> >> You must use File in place of GLib::File if you want your program to >> access files. >> >> Carlo >> > > Then my program won't be able to access my files because they are only > reachable through gvfs. Also, what does http://ruby-gnome2.sourceforge.jp/hiki.cgi?GLib%3A%3AFile describe? A non-existent module? Thanks Michal
on 2011-06-08 20:59
Michal Suchanek wrote in post #1003626: > Then my program won't be able to access my files because they are only > reachable through gvfs. have you tried ruby/gnomevfs? never used it myself, but looks like it could work for you... http://ruby-gnome2.sourceforge.jp/hiki.cgi?Ruby/GnomeVFS cheers, - j
on 2011-06-12 22:08
On Mon, Jun 6, 2011 at 19:20, Michal Suchanek <hramrach@centrum.cz>
wrote:
> what do I need to read a file?
require 'gio2'
on 2011-06-29 14:15
Hello On 12 June 2011 22:08, Nikolai Weibull <now@bitwi.se> wrote: > On Mon, Jun 6, 2011 at 19:20, Michal Suchanek <hramrach@centrum.cz> wrote: > >> what do I need to read a file? > > require 'gio2' with recent ruby-gnome2 I get gio2 which provides the GLib::File module. (GLib::File.new_for_uri uri).read.close returns true so I guess I can read files. Thanks Michal
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.