From: Joshua K. <jos...@li...> - 2002-11-07 21:46:47
|
> Hi, > > On Mon, 04 Nov 2002 19:08:03 -0700 > "Joshua Keith" <jos...@li...> wrote: > > > I have a question regarding rbgtkentry.c, as I have noticied several of the > > methods have been removed from this widget. One of the most important being > > 'get_text'. I've figured out that get_chars(0, -1) can be substituted, but > > why has a non-deprecated method been removed? (see > > http://developer.gnome.org/doc/API/2.0/gtk/GtkEntry.html ). > > The get_text method was in the 1.11 rev, but was removed, > > and I was wondering if it's coming back, and if not...why? > > Because they are properties. > Property accessors are auto-generated. > > Gtk::Entry#set_text, Gtk::Entry#text=, Gtk::Entry#text are defined automaticaly. > You can check them in rbbr. > > See below the message again. > And also check http://ruby-gnome2.sourceforge.net/naming.html. > Apologies if I'm just dense, but I've played with it quite a bit, and I can not pull the text from the entry widget. Seems like most of the ways to pull the text from the widget only returns the widget itself, not the data contained within. In addition, while playing with the entry widget, when ever the 'activate' signal is emitted (as well as when entry.delete-text is called), I get the following error: ** (filename:1925): WARNING **: rbgobj_rvalue_to_gvalue: unsupported type: (null) the offending lines of code are: entry.signal_connect('activate') { self.display(entry) } def display(entry) data = entry.get_chars(0, -1) entry.set_text('') <----Workaround for the entry.delete-text (silenced the orginal error) end Am I missing something in this, or did I trip over a bug? (BTW, seems that the ListStore is working great. Expect some docs on ListStore this weekend(In the format you specified). Still trying to wrap my head around the TreeStore though). Question 2: Regarding Gtk.input_add: I get the error: :tried to create a Proc object without a block(ArguementError) The line of code in question is as follows: @sock = TCPSocket.new(server, port) Gtk.input_add(self.test(), @sock) I'm assuming that this is something I'm doing incorrectly, (most likely not setting up blocking up on the socket being called), but I thought I would pass it along to see if you could shed any light on it for me. Thanks for your time, Josh PS - I know I badger you a lot, but wanted to say thanks for all the hard work you guys have put into Ruby-GNOME2. -- ______________________________________________ http://www.linuxmail.org/ Now with POP3/IMAP access for only US$19.95/yr Powered by Outblaze |