Re: more news about a static member func declaration for a signal func



philip dahlquist wrote:
well, when i static-ized my signal function, it made it no possible to any other non-static
member functions or non-static data members.  the static declaration
solved one problem but created other problems.  are there any other
solutions to the signal function declaration problems?
should i re-post the code snippet?


You can pass your C++ object's 'this' pointer as the user data argument to g_signal_connect(). Then cast the data parameter in your static signal handler back to it's C++ class pointer.

Jeff.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]