Re: Programming style

2005-11-01 Thread Stefan Kost
hi, Wallace Owen wrote: On Mon, 2005-10-24 at 17:21 -0400, Tristan Van Berkom wrote: ... I just wanted to point out that the user data argument is usable and efficient (since nobody had mentioned that yet). Ofcourse there are cases where it isn't convenient to use the user_data; I might as

Re: Programming style

2005-10-31 Thread Wallace Owen
On Mon, 2005-10-24 at 17:21 -0400, Tristan Van Berkom wrote: ... I just wanted to point out that the user data argument is usable and efficient (since nobody had mentioned that yet). Ofcourse there are cases where it isn't convenient to use the user_data; I might as well also note that,

Re: Programming style

2005-10-24 Thread Gus Koppel
César Leonardo Blum Silveira wrote: Thanks for your answer! So, as my app is a Glade app, I can use that lookup_widget() function you mentioned? Otherwise I would use your function :-) That's correct. For fully Glade-built UIs both functions are usable. Mine is just a more generic version

Re: Programming style

2005-10-24 Thread Alan M. Evans
On Sat, 2005-10-22 at 11:49, César Leonardo Blum Silveira wrote: Hello all, I have a few doubts about the way I code my GTK applications. One of them is: Is it ok to use many global variables for the widgets? For example, in a glade app where callbacks are of the form void

Re: Programming style

2005-10-24 Thread Gus Koppel
Tristan Van Berkom wrote: Every widget callback comes with a user_data argument, and you can pass the desired data through that argument (which is just as fast as using a global variable and is just as clean as using a lookup_widget type of routine). Right. However, if you want your signal

Re: Programming style

2005-10-24 Thread Tristan Van Berkom
Gus Koppel wrote: Tristan Van Berkom wrote: Every widget callback comes with a user_data argument, and you can pass the desired data through that argument (which is just as fast as using a global variable and is just as clean as using a lookup_widget type of routine). Right. However, if

Re: Programming style

2005-10-23 Thread Gus Koppel
César Leonardo Blum Silveira wrote: I have a few doubts about the way I code my GTK applications. One of them is: Is it ok to use many global variables for the widgets? For example, in a glade app where callbacks are of the form void callback(GtkWidget *widget) I can only have access to

Re: Programming style

2005-10-23 Thread César Leonardo Blum Silveira
Thanks for your answer! So, as my app is a Glade app, I can use that lookup_widget() function you mentioned? Otherwise I would use your function :-) Thanks again On 10/23/05, Gus Koppel [EMAIL PROTECTED] wrote: César Leonardo Blum Silveira wrote: I have a few doubts about the way I code my