Re: Parameter passing and gpointers...
- From: David Given <dg tao-group com>
 
- To: gtk-app-devel-list gnome org
 
- Subject: Re: Parameter passing and gpointers...
 
- Date: Tue, 13 Nov 2001 18:33:51 +0000
 
On Tuesday 13 November 2001 18:25, you wrote:
Ok, some of you may recall that a few months ago I sent a question talking
about sending multiple params to a signal handler.  One suggestion was
thru using a struct and passing a reference to that struct.  This is
giving me some problems and I'm not sure why.  I only have so much
experience in C so that may be what's wrong.  Here's an example of what
I'm trying to do:
It's always the simple errors that cause the trouble...
void create_dialog( void ) {
      struct MyStruct *my_struct;
                = g_new(struct MyStruct, 1)
      .....
      my_struct->entry1 = gtk_entry_new();
      my_struct->entry2 = gtk_entry_new();
You're forgetting to allocate the structure before you use it.
-- 
+- David Given --------McQ-+ "The sky was the perfect untroubled blue of a
|  Work: dg tao-group com  | television screen, tuned to a dead channel." ---
|  Play: dg cowlark com    | Neil Gaiman, _Neverwhere_ 
+- http://www.cowlark.com -+ 
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]