flat assembler
Message board for the users of flat assembler.
Index
> Linux > I need a little help |
Author |
|
scientica 30 Oct 2003, 22:33
It's C not C++ (the -> look's wrong to me, I know c++ rather well, but my c skills are under devlopment, but I don't think c has the -> operator).
Anyways, here is what I dug out from the gtk tutorial: Quote: Theory of Signals and Callbacks here is the signlar connection in one of the examples (buttons): Code: /* Connect the "clicked" signal of the button to our callback */ g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (callback), (gpointer) "cool button"); So I guess your code should look like this: Code: /* Connect the ok_button to file_ok_sel function */ gtk_signal_connect ((G_OBJECT) ok_button, "clicked", (G_CALLBACK) file_ok_sel, filew ); // or (if I miss understood the -> operator) /* Connect the ok_button to file_ok_sel function */ gtk_signal_connect ((G_OBJECT) ( (GTK_FILE_SELECTION)(filew).ok_button), "clicked", (G_CALLBACK) file_ok_sel, filew ); I'd recoment downloading the gtk tutorials, as stated in the tutorial: Quote: Tutorial Availability _________________ ... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself. - Bradley Kuhn |
|||
30 Oct 2003, 22:33 |
|
devilsclaw 31 Oct 2003, 01:14
im using gcc and it compiles into a working sample so -> is in C other wise it would not compile and if it did it would give a warning
|
|||
31 Oct 2003, 01:14 |
|
devilsclaw 31 Oct 2003, 01:16
i have also already read that from the GTK website and the sample i posted is a stripped down version of the one they have at there site i only needed help with on section
|
|||
31 Oct 2003, 01:16 |
|
jInuQ 11 Nov 2003, 11:58
If i remember right the -> is used for accessing structure member thru a pointer.
http://www.phim.unibe.ch/comp_doc/c_manual/C/SYNTAX/struct.html#pointers _________________ jInuQ "Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." - Antoine de Saint Exupery |
|||
11 Nov 2003, 11:58 |
|
scientica 11 Nov 2003, 12:25
ok, thanx for the link. My misstake, thougt -> was a class (thus c++) specific thing, but my memory failed me (long time since last c++ app)
_________________ ... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself. - Bradley Kuhn |
|||
11 Nov 2003, 12:25 |
|
jInuQ 12 Nov 2003, 09:28
I think it was less a mistake and more just far too much stuff to remember.
_________________ jInuQ "Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." - Antoine de Saint Exupery |
|||
12 Nov 2003, 09:28 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.