Re: couple dialog tweaks



Sven Neumann <sven gimp org> writes:

> what's broken about code like
> 
>   gtk_widget_hide (GTK_WIDGET (g_list_nth_data (gtk_container_children (GTK_CONTAINER (GTK_BIN (dialog)->child)), 1)));

This is what most cultures have defined as "unmaintainable".

It is no different from having

	struct {
		int public;
		gpointer private;
	} my_struct;

and then code that does

	struct my_struct a;
	int *private_member;

	init_my_struct (&a);

	private_member = ((int *) a.private) + 5; /* assume offset */

	*private_member = 42;

which may work fine, but is, well, just broken.

  Federico




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