Re: clist selsction

From: Date: Wed, 08 Sep 2004 04:49:57 +0000
Subject: Re: clist selsction
References: 1  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-5059@lists.php.net to get a copy of this message
Hi
In otherwords you can't get the selection from the same function where the clist was created?
so you can't pass the regionId from button to confirmDeleteRegion like: $button->connect_object("clicked", "confirmDeleteRegion",/* something here to pass selected regionId*/); function confirmDeleteRegion($regionIdToDelete){
     /* delete the region sent */
} and instead have to send confirmDeleteRegion the $list, get the selection, then delete? whereas in a web app you would get it from a form input $_GET or $_POST $ok = confirmDeleteRegion($_GET[regionId]) confirmDeleteRegion($regionIdToDelete) {
     /* delete */
}
The problem is that the selection may be changed by the user *after* you have connected the signal. When you connect the 'clicked' signal, you read the selection and pass it as a fixed parameter. The first time the signal is catched and the function you connected is called can be in the far future, while the user has changed the selection in the meantime. In the web environment it would work as the user can't change anything while you process the request. Regards/MfG, Christian Weiske -- XMMS is playing now: Nelly Furtado - Forca

Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
« previous php.gtk.general (#5059) next »