Re: [gtk-list] Re: announce: yet another gtk+ C++ wrapper (no caps as Owen suggest)
- From: Tero Pulkkinen <terop students cc tut fi>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: announce: yet another gtk+ C++ wrapper (no caps as Owen suggest)
- Date: 14 Sep 1998 04:08:01 +0300
Mario Motta <mmotta@guest.net> writes:
> // Assuming that A is a class into widget hierarchy:
> //. A constructor
> A::A() {
> widget = gtk_some_widget_new();
> SignalConnect("a_signal",this,widget,&A::MyAnswer);
which connect() is this? :) Are you meaning gtk_signal_connect(),
Gtk_Object::signal_connect() or connect_to_method()?
(connect_to_method is the only one people should ever use. The others
are implementation details you should not use. (guess they should be
properly hidden and documented as impelementation details...)
> // assume this = 1000 for instance
> // and widget = 2000 for instance
> }
> //...
> and now the class A response method
> void A::MyAnswer(A* sender)
> {
> printf("\n this:%p, sender:%p", this,sender)
> fflush(stdout);
> // output will be: this:2000, sender: 1000
You will never get this result with connect_to_method call you should
be using.
> // gtk+ calls MyAnswer putting (as was easy to foresee) widget as first hidden
> //arg thus replacing this with his own widget.
??
--
-- Tero Pulkkinen -- terop@modeemi.cs.tut.fi --
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]