Re: [gtk-list] Re: Best way to make a dialog..




> A struct seems like a perfectly good thing to use to pass the pointers:
> 
> struct entries{
> GtkWidget *entry1, *entry2, entry3;
> };

Ouch.. this is completely different than what I had in mind... I was
hoping just to pas along a data structure not a structure with widgets as
that means I have to create them before creating the dialog.  I can see
how this would work but it would also chew memory as I am not just storing
the data but the widget overhead too...

> > struct entries entry_ptrs; > 
> gtk_signal_connect(GTK_OBJECT(ok_button), "clicked",
> GTK_SIGNAL_FUNC(callback_func), entry_ptrs);
I tried putting my data structure here (just data not widgets) and all I
got was crap from the variables.... (aka ascii garbage).... so doe sthis
mean that the data area on a signal connection must be widgets???? (I
think am either tired or on crack :P (not to mention I attached the data
updating to the destroy event rather than a clicked event.... if I switch
it over to a clicked event how would i kill off the window? )

 
> > void callback_func(GtkWidget *widget, struct entries entry_data)
> {
>    blah...
> }

> You could also use an array of 3 widgets which might save you a little memory,
> but it really isnt that significant.
> 
> Sean Cody wrote:
> 
> > supposed I have 3 ints in a struct called trois_int which holds the data
> > entered in from a dialog box.
> >
> > would i just return this structure from a function.
> >
> > MyData = make_dialog_go_now();
> > or would I have to pass the data variable in the function
> > make_dialog_go_now(MyData);
> >
> > Any suggestions or examples?????
> >
> > Sean Cody (aka NullStream)
> > umcodysw@cc.umanitoba.ca (SCHOOL)
> > tdr@fuzyscsi.dhs.org      (HOME)
> > seanc@pangea.ca           (WORK)
> >
> > "If God's my witness then God must be blind."
> >         Garbage - As Heaven Is Wide
> >
> > --
> > To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
> 
> -- 
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
> 
> 

Sean Cody (aka NullStream) 
umcodysw@cc.umanitoba.ca (SCHOOL)
tdr@fuzyscsi.dhs.org      (HOME)
seanc@pangea.ca           (WORK)  

"If God's my witness then God must be blind."
	Garbage - As Heaven Is Wide



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