program organization



Dear all,
I would like to ask which organization is better. Thx a lot~

Method 1:
GtkWidget widget0;	//entry A
GtkWidget widget1;	//entry B
GtkWidget widget2;	//entry C
widget0=lookup_widget(...);
widget1=lookup_widget(...);
widget2=lookup_widget(...);
gtk_entry_set_text(widget0,...);
gtk_entry_set_text(widget1,...);
gtk_entry_set_text(widget2,...); 

Method 2:
GtkWidget widget;
widget=lookup_widget(...);	//entry A
gtk_..._set(widget,...);
widget=lookup_widget(...);	//entry B	
gtk_..._set(widget,...);
widget=lookup_widget(...);	//entry C
gtk_..._set(widget,...);




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