Re: Parameter passing advice...



I use two different methods:
 - use a struct to pass the information
 - create a new class (in my case I always inherit from a GtkWidget
   sub-class) and use instance variables

This works fine for me...

jochen

On Tue, Sep 25, 2001 at 01:45:26PM -0400, Chris Elston wrote:
A common "problem" when working the C version of GTK is the what's and
how's of passing parameters to signal handling functions.  If I'm not mistaken,
every "signal_connect" function ends in a gpointer (* void) parameter
which is there for the programmer to use for his own purpose(s).  Now,
I have experience with C but I'm no expert so this next question is both
related to that and my curiousity with GTK.

Sometimes, one parameter is not enough.  What methods have you all used in
the past to get around having only one gpointer at your disposal when you
need much more?  GLists?  Arrays?  some kind of hack around with regards
to the nature of void pointers?

-- 

Chris Elston
celston corky sapien net
---------------------------------
Nucleus Communications
Web Script Programmer


_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




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