Re: Question about Data Exchange
- From: Michael Ekstrand <mekstran scl ameslab gov>
- To: chao yeaj <yeajchao gmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Question about Data Exchange
- Date: Wed, 30 Aug 2006 12:23:36 -0500
On Aug 29, 2006, at 12:51 AM, chao yeaj wrote:
Hello everyone
You know ,in an application
one widget may associated with one data member
For example,there is a entry widget ,the user can write some data
into the entry widget;In the application, there must be a data
variable named str_widget,associated to the entry widget.
When the user changed the entry's text ,the str_widget variable's
value should be update;and, when the program changed the str_widget's
value somewhere, we need update the entry widget's display too!
(Update the UI )
The problem is: i did not know how and when update the data
variable and the widget ?
You can update the variable in response to the widget's 'changed'
signal. To go the other way, you will need to write a setter
function that is always used to set the variable, and have it update
the widget. If you're writing your own GObjects for this app, you
could make the variable a property of some object, but that might be
overkill.
- Michael
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]