Style/Theory
- From: "Sean Cody" <umcodysw cc umanitoba ca>
- To: <gtk-list redhat com>
- Subject: Style/Theory
- Date: Tue, 7 Sep 1999 21:18:47 -0500
Where would one store the data applicable to a particular window/widget?
Let's just say I have a fictitious program which has an entry widget and a
button. When the button is clicked the program is to preform a set of
operations on the entry widget. Another call back for this entry widget
would be say on key press or something like that to check to see of the key
pressed is the enter '\13' key signalling input completion.
How would the call back know what widget is being referred to? Would the
char* or the entry widget be global (which doesn't sound nice). Though what
about larger input areas with multiple input fields? How would the button
call back know where the entry widget is to retrive the data (assuming that
is is created in a local variable in a dialog creation function)...
Am I making sense? I completely understand the idea of call backs and
attaching them to certain events though I don't understand how one would
connect the data to this system. (I guess I am used to the object-oriented
model ob embedding the data manipulation inside "window" or am I completely
off base).
Any ideas or suggestions? (I have read through the Harllow book and the
online GTK tutorial but this "little" descrepancy is blocking my mastery of
GTK (which completely impresses me)).
Thanks,
Sean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]