obgtk: HelloWorld example



Ran into a problem here....
The Helloworld program in the tutorial has 3 posible events : destroy,
delete, and the button click.
The button click was no problem.
Were I run into one, is....
to call destroy I do [window connectObj:"destroy" :self];
Then when I compile, it requires I have -delete and -destroy methods in
the class.
Seems to me, it shoudl only require -destroy.
Also, if I do it the [window signal_connect:"destroy"
signalFunc:gtk_main_exit signalData:NULL]; it also wants me to have
those 2 methods...which by my understanding, it shouldn't right?
Then, finally...
If I try to add a "delete_event" catch like [window
connectObj:"delete_event" :self]
The whole thing falls apart....the button still works fine, but the
other events give this error at run time:
error: HelloWorld (instance)
?# does not recognize error: HelloWorld (instance)
%s does not recognize %s

IOT trap/Abort (core dumped)

Is this something that should be fixed in obgtk, or am I doing it wrong?

I did get "delete_event" to work with [window
signal_connect:"delete_event" signalFunc:gtk_main_quit funcData:NULL]
but besides something like that, I can't get "delete_event" to be
recognised.
That works fine if I want to kill the window, but delete would be
pointless then.
For example...in helloworld.c delete prints a message and returns TRUE.



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