Forum: Ruby-Gnome 2 Switching to gtk3

D9ba13de4e62fcabffa4403731434e42?d=identicon&s=25 Eric C. (eric_c65)
on 2013-12-24 08:19
Hi:

I'm trying to upgrade visualruby to gtk3.  I understand that there is no
VBox or HBox in gtk3.  When I change them in glade to Gtk::Boxes I get
this error:

   GLib-GObject-WARNING **:cannot create instance of abstract
(non-instantiatable) type `GtkBox'
/home/eric/vrp/vrlib/lib/GladeGUI.rb:154: [BUG] Segmentation fault
ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-linux]

Why can't I add a GtkBox to a Window?

E
Ee6ffca720cc428d70247dcd7377dd48?d=identicon&s=25 Kouhei Sutou (Guest)
on 2013-12-24 14:24
(Received via mailing list)
Hi,

In <8dfaff07a1883a7b5ad63b9551685a89@ruby-forum.com>
  "[ruby-gnome2-devel-en] Switching to gtk3" on Tue, 24 Dec 2013
08:19:30 +0100,
  "Eric C." <ruby-forum-incoming@andreas-s.net> wrote:

> I'm trying to upgrade visualruby to gtk3.  I understand that there is no
> VBox or HBox in gtk3.  When I change them in glade to Gtk::Boxes I get
> this error:
>
>    GLib-GObject-WARNING **:cannot create instance of abstract
> (non-instantiatable) type `GtkBox'
> /home/eric/vrp/vrlib/lib/GladeGUI.rb:154: [BUG] Segmentation fault
> ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-linux]
>
> Why can't I add a GtkBox to a Window?

Could you show your glade file and script?


Thanks,
--
kou
B078cb4f4fb473c7a54d1fc36d10c70e?d=identicon&s=25 Regis d'Aubarede (raubarede)
on 2013-12-24 15:57
Eric C. wrote in post #1131515:

> I'm trying to upgrade visualruby to gtk3.

Hi,

As visualruby work on windows:  Warning !!
There are big issue with gtk3 : scrach when resize/move main window...

the bug seem depend on the content of the window:

GLib:ERROR:gmain.c:3057:g_main_dispatch: assertion failed:
(current->dispatching_sources == &current_source_link)

or

d:/usr/Ruby/local/Ruiby/lib/ruiby_gtk/ruiby_dsl3.rb:1865: [BUG]
Segmentation fault
ruby 2.0.0p0 (2013-02-24) [i386-mingw32]
D9ba13de4e62fcabffa4403731434e42?d=identicon&s=25 Eric C. (eric_c65)
on 2013-12-24 19:52
Attachment: VR_ENV_GLOBAL.glade (10 KB)
Attachment: GladeGUI.rb (10 KB)
Hi guys.

Thanks for your great work.

I'm getting the error from line 154 in GladeGUI:

@builder = Gtk::Builder.new.add_from_file(file_name)

The file name is correct, and it tries to load the attached file
VR_ENV_GLOBAL.glade.

/home/eric/vrp/vrlib/lib/GladeGUI.rb: line 154
   GLib-GObject-WARNING **:cannot create instance of abstract
(non-instantiatable) type `GtkBox'
/home/eric/vrp/vrlib/lib/GladeGUI.rb:154: [BUG] Segmentation fault
ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-linux]

The history is this:

I'm upgrading to gtk3, so I first created the .glade file in glade v2.8
or so.  I believe that it was a libglade file.  I don't understand the
distinction.  Now, I'm opening it with glade v.3.12.1 and changing the
vboxes and hboxes to boxes.  I save it, and the error appears.  It works
fine with the old glade files.

There might be bugs in glade because its crashing and acting funny.

E
D9ba13de4e62fcabffa4403731434e42?d=identicon&s=25 Eric C. (eric_c65)
on 2013-12-25 00:04
UPDATE:  I noticed that they've changed vbuttonbox and hbuttonbox to
just buttonbox too.  I changed everything to buttonbox, but the problem
persists.
Ee6ffca720cc428d70247dcd7377dd48?d=identicon&s=25 Kouhei Sutou (Guest)
on 2013-12-25 13:55
(Received via mailing list)
Hi,

Thanks for attaching a script and a glade file. Could you
also attach a script that reproduces your problem?
GladeGUI.rb just defines a module. The module isn't used.

Thanks,
--
kou

In <7db0cf39217d87266695d06724bbfef4@ruby-forum.com>
  "Re: [ruby-gnome2-devel-en] Switching to gtk3" on Tue, 24 Dec 2013
19:52:51 +0100,
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.