Re: dialog problems . . .



Hi,

On 22 Jun 2002, Nils O. [ISO-8859-1] Selåsdal wrote:

> > here's the code:
> >
> > void my_callback_dialog(GtkWidget *widget, struct mystruct *ok)
> > {
> > ...
> >
> >         res = gtk_dialog_run (GTK_DIALOG (dialog));
> > 	switch (res)
> > 	{
> > 	case GTK_RESPONSE_ACCEPT:
> > 		my_log_it(dialog, ok);
> > 		break;
> > 	default:
> > 		break;
> > 	}
> > 	gtk_widget_destroy (dialog);
> Here you destroy the dialog,, do you ever recreate it so it exists
> the next time the my_callback_dialog gets calles?

The dialog gets created in the my_callback_dialog function (which is a
callback function connected to a main window button "clicked" signal).


> > then in function my_log_it() I call another function which displays
> > another dialog
> >
> >
> > void my_second_dialog(GtkWindow *main_window)
> > {
> >
> >  . . .
> >
> > 	gtk_dialog_run (GTK_DIALOG(dialog));
> > 	gtk_widget_destroy(dialog);
> same here..
> hmm.. you use the dialog variable..I hope its not the same variable as
> in the first function..

No, this dialog is also created directly in the function (and gets
destroyed at the end of the function).


> > Any Ideas ?
> Use a debugger, DDD is very nice. Step through the program and see where it
> crashes..
>

I am going to give it a try. thanks.


-Robert Walker.





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