Re: Automatically generated code by Glade.. where to put certain functions?



i mean where do i put all the "GUI Logic" for the program.

You put the GUI code where you want to put it. After all, this is C, you have this flexibility with C.

Most people just learning glade and C, and using the automatically generated code, would put the code in callbacks.c.

If it doesn't work, it's probably because you are putting the code in the wrong place, or coding it wrong, or misunderstanding what glade does.

Briefly, you need to set up a callback for the ok button. You do this in glade. The function that glade writes for this will be empty, and you must fill it in.

You fill it in with code which tells the program to show the second window. You can see how to do this by looking at examples, try the example editor that comes with glade as one source.

Compile and run.  That's it.

There is a glade users list, You might try there for more answers to using glade in the future. You can find it off the glade homepage at
http://glade.gnome.org/lists.html.

Cheers,

Rikke





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