Re: Killing vs blocking signals
| From: | dpgirago at mdanderson dot org | Date: | Tue, 17 Aug 2004 16:40:47 +0000 |
| Subject: | Re: Killing vs blocking signals | ||
| Groups: | php.gtk.general | ||
| Request: | Send a blank email to php-gtk-general+get-4970@lists.php.net to get a copy of this message | ||
Hi Scott,
You're right about the signals, and I'm using the 'click' signal to
capture the state changes in the checkboxes, and the 'select_row' signal
in the clist to trigger a subsequent query.
But only the 'checkbox management' function calls the 'populate patient
clist' function. But each change in the status of a checkbox does make a
call to the 'populate patient clist' function so that the patient names
can be added to or removed from the clist select box. It is only when,
even after a period of no user activity, the user clicks on one of the
patient names in the clist that all the numerous identical queries are
made. So somewhere, all the 'clicks' are stacking up until the patient is
selected.
Thanks, though for trying...
Dave
Scott Mattocks <scott@crisscott.com>
08/17/2004 11:01 AM
To:
"php-gtk-general@lists.php.net" <php-gtk-general@lists.php.net>
cc:
Subject:
Re: [PHP-GTK] Killing vs blocking signals
Dave,
I haven't used CList and I don't know that I follow exactly what is
happening and I may be completely wrong here, but I am going to try and
help anyway :)
A lot of methods will emit signals when called. This can be kind of
cunfusing because signals will be emitted without direct user input.
For instance look at the code below:
function click() {
$clist->select_row(0, 1);
}
function select_row() {
echo 'Row selected';
}
$clist->connect('clicked', 'click');
$clist->connect('select-row', 'select_row);
When a user clicks on something the select_row function will be called
too. You may be triggering function calls by accident and that may
account for your extra queries.
Of course I may have no idea what I am talking about.
Scott
--
PHP-GTK General Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php