[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtkmm
Subject:    [gtkmm] Problem with input.connect
From:       Morten Brix Pedersen <morten () wtf ! dk>
Date:       2001-08-29 21:09:46
[Download RAW message or body]

Hi all,

I'm trying to make a small application, using sockets - so I decided to
try out the Gtk::Main::input.connect function, which can monitor a file
descriptor.

Now I'm stumbling into some problems:

I have my main class, with the application window, called 'MainApp'.
'MainApp' creates an object from the class 'ServerConnection' (which
creates the connection, and thereby gets a file descriptor).

In the ServerConnection constructor, I want to call MainApp's
input.connect function, so I can add a monitor on the file descriptor.

But how is this done? I try doing:

mainapp->app->input.connect(slot(this, &ServerConnection::readdata), fd , \
GDK_INPUT_READ);

I get this compile error:
/usr/include/sigc++/object_slot.h: In function `static struct SigC::SlotData * \
SigC::ObjectSlot2_<void,int,GdkInputCondition,ServerConnection>::create(ServerConnection \
                *, void (ServerConnection::*)(int, GdkInputCondition))':
/usr/include/sigc++/object_slot.h:315:   instantiated from `SigC::slot<void, int, \
GdkInputCondition, ServerConnection, ServerConnection>(ServerConnection *const &, \
void (ServerConnection::*)(int, GdkInputCondition))' ServerConnection.cc:13:   \
                instantiated from here
/usr/include/sigc++/object_slot.h:261: no matching function for call to \
`ServerConnection::register_data (SigC::ScopeNode *)'


Thanks in advance.

- Morten.

--
Morten Brix Pedersen <morten@wtf.dk> - http://www.wtf.dk/hp/
Copenhagen, Denmark. -- Programmer, Scout, Geek.

_______________________________________________
to unsubscribe or change your subscription parameters :
http://lists.sourceforge.net/lists/listinfo/gtkmm-main


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic