Re: sending user-defined messages to widgets?



On Tue, 2003-08-26 at 18:33, Mohammed Sameer wrote:
On Tue, Aug 26, 2003 at 04:07:31PM +0200, Lars Ruoff wrote:
At a first glance to the docs, i think gtk_emit_signal could be the function
to go for, but i didn't get it work so far.
What do i have to do to define a user_defined message that can be sent to a
widget hirarchie, and for which widgets can register?

I don't know, But i think g_object_notify() maybe the Right Thing (tm).
I'm not sure,

This is probably correct.  It should be noted, however, that GTK doesn't
use message passing.  Instead it uses signals and callback functions.  

I know you are trying to avoid this, but most gtk programs I've seen
access widgets directly from within the framework of the dialog box.  I
don't believe that this is incorrect or violates any paradigm.  Since
gtk apps are generally single-threaded (at least the thread that runs
the gui), you can directly access another widget and call a method on it
from anywhere that you have a pointer to a widget.  Why would this not
be a good idea in your case?  Perhaps if you told us a little bit about
what you are doing then we can find a good solution for this.


Michael


-- 
Michael Torrie <torriem chem byu edu>



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