Re: [glade--]Treeview no glademm
- From: Susumu Yoshida <susumu yt com>
- To: Christof Petig <christof petig-baender de>
- Cc: glademm-list gnome org
- Subject: Re: [glade--]Treeview no glademm
- Date: Mon, 19 Jan 2004 20:04:19 +0900
Hi, Christof
Thank you for replying.
On Mon, 19 Jan 2004 11:26:52 +0100
Christof Petig <christof petig-baender de> wrote:
> Susumu Yoshida schrieb:
> >
> > item1 | item2 | item3
> > ---------------------------
> > entry11 | entry12 | entry13
> > entry21 | entry22 | entry23
> > entry31 | entry32 | entry33
>
> > I want to make it output entry21 to std::cout when I click entry21.
> > 1.Is "select_cursor_row" signal the right signal to connect to do that?
>
> I think that treeview1->selection()->changed().connect is more
> appropriate. But there's no way to make glade* do that for you. Simply
> put that in your ctor.
I tried but not successful as below :
My code is ...
window1.cc:37: treeview1->selection()->changed().connect(SigC::slot(*this, &window1::on_treeview1_selection_changed));
}
The error message I got is ...
nana:~/2004/XHercules/exp-tree_view4/src$ make
source='window1.cc' object='window1.o' libtool=no \
depfile='.deps/window1.Po' tmpdepfile='.deps/window1.TPo' \
depmode=gcc3 /bin/sh ../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -I/usr/include/gtkmm-2.0 -I/usr/lib/gtkmm-2.0/include -I/usr/include/gtk-2.0 -I/usr/lib/sigc++-1.2/include -I/usr/include/sigc++-1.2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/X11R6/include -I/usr/include/freetype2 -I/usr/include/atk-1.0 -c -o window1.o `test -f 'window1.cc' || echo './'`window1.cc
window1.cc: `window1::window1()' in the constructor :
window1.cc:37: no matching function for call to `Gtk::TreeSelection::changed()'
make: *** [window1.o] error 1
The problem is that there is no member function called "selection()"
in the Gtk::TreeView class.
I looked for it on
http://gtkmm.org/gtkmm2/docs/reference/html/classGtk_1_1TreeView-members.html
but couldn't find.
I will search the right one but I would appreciate if you knew and told me.
> > 2.I selected the "select_cursor_row" signal and tried to compile the code
> > but failed. The error message I got is shown below.
>
> Perhaps glademm is generating the wrong signature. Do you already use
> the CVS version?
I figured out that problem last night. It was glademm's bug as you mentioned.
It codes a function of "void" return type while it should code one of "bool"
return type.
I fixed that problem manually and I was able to compile successfully.
(But "select_cursor_row" signal was not what I wanted)
I am not using the CVS version yet. Is that problem already fixed
in the CVS version?
--
from Susumu Yoshida(susumu yt com)
Powered by Red Hat Linux
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]