Forum: Ruby-Gnome 2 name collision?

4913bcb685792f601ae9813b4713abb9?d=identicon&s=25 Detlef Reichl (Guest)
on 2013-04-16 18:08
(Received via mailing list)
Hi,

I'm on porting the ComboBox sample from C to ruby.

There is Gtk::ComboBoxText in use. This class has an remove-methode
itself and a remove-methode inherited from Gtk::Container. The one from
Gtk::Container, which will remove the child and not the text from the
Combo can't be used?!

Cheers, detlef
Ee6ffca720cc428d70247dcd7377dd48?d=identicon&s=25 Kouhei Sutou (Guest)
on 2013-04-17 14:37
(Received via mailing list)
Hi,

In <516D772F.2040206@gmx.org>
  "[ruby-gnome2-devel-en] name collision?" on Tue, 16 Apr 2013 18:07:11
+0200,
  Detlef Reichl <detlef.reichl@gmx.org> wrote:

> There is Gtk::ComboBoxText in use. This class has an remove-methode
> itself and a remove-methode inherited from Gtk::Container. The one from
> Gtk::Container, which will remove the child and not the text from the
> Combo can't be used?!

It seems that the sample is too tricky for Ruby-GNOME2...
I think that we don't need to port the sample.

If you want to port the sample, the following code will work:

  text.signal_emit("remove", text.child)
  text.signal_emit("add", entry)


Thanks,
--
kou
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.