Re: Callbacks and widgets




Yep, I know about some of them:

        1.- Passing a data structure
        2.- Using global variables (not good threading support)
        3.- Passing window to gpointer and searching.

But the point is. 

What is the best way? Is there any other way to do that? Because
structure option looks more suitable for different data to be passed not
just widgets...

I tried to set the widgets as user-data of the widget to be triggered.
But it seems not to work.

I will look anyway in the older mailing list.

Thank you.


On Tue, Mar 28, 2006 at 09:38:20AM +0200, Gonzalo Aguilar Delgado wrote:

Because receiver callback is getting only the receiver widget,

In addition, the callback gets an arbitrary pointer passed
as user_data to g_signal_connect().  A pointer can be used
to pass anything.

This is a very frequently asked question, search the
archives for discussion...

Yeti


--
That's enough.
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
-- 
Gonzalo Aguilar Delgado - Ingeniero en InformÃtica
        [ Seguridad & Medios de pago ]




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