Re: signals



Hi,

On Mon, 23 Aug 2004 01:55:12 -0400, Ruben Safir Secretary NYLXS
<ruben mrbrklyn com> wrote:
the hospital.  I hoped to create a top_level window with a vbox.  The top
of the vbox has some buttons and the bottom has a frame.  Depending on
which button is clicked, a different 'form' would desplay below.

You might consider using a notebook widget instead. It does more or
less this, but looks prettier.

In order to retain access to everything, in fomrs.h I has a struct definition

struc s1, which has membership of GtkWidgets which I hoped to assign to
structure instances to pass to callback functions attacts as gpoint data,
with is the last argument in g_signal_connect, such as follows

g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (lbw_screen), &handle);

This should work fine. I think there must be a problem somewhere else
in your code. Maybe you are allocating "struct s1 handle" as a local
variable and it's goinig out of scope?

You should have handle as a local of main() (so it's always in scope
while your program runs), or allocate on the heap with g_new().

John



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