RE: [PHP-GTK] events_pending

From: Date: Mon, 24 May 2004 14:12:53 +0000
Subject: RE: [PHP-GTK] events_pending
Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-4557@lists.php.net to get a copy of this message
OK, I must be getting the wrong end of the stick here. My program functions fine when I run it in static mode, but I'm trying to use events_pending to dynamically update a clist from a DB. I guess I'm putting it in the wrong place or something. <?php require('commonfunctions.inc'); // include file for common functions require('selectfromclist.php'); require('sortclist.php'); // function to sort the clist in this file require('clist.inc'); // function to query the db and produce a clist $window = &new GtkWindow; $windows['Sent Messages'] = $window; $window->set_name('query_window'); $window->connect('delete-event', 'delete_event'); $window->connect('destroy', 'destroy'); // connect event with function $window->set_policy(false, true, false); $window->set_title('Sent Messages'); $window->set_position(GTK_WIN_POS_CENTER); // set position relative to top left corner $window->set_usize(500, 350); // set window size $box1 = &new GtkVBox(); $window->add($box1); //frame displaying entered sql query $frame = &new GtkFrame('Sent Messages'); $box1->pack_start($frame,false); $label = &new GtkLabel("Sent messages: S = Sending, R = Received"); $frame->add($label); //frame displaying clist with the query result $frame = &new GtkFrame('Sent Messages'); $box1->pack_start($frame,true); //we'll display the result with scrollbars $scrolled_win = &new GtkScrolledWindow(); $scrolled_win->set_border_width(5); $scrolled_win->set_policy(GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); $frame->add($scrolled_win); $button = &new GtkButton('Refresh'); $button->connect('clicked', 'refresh_clist'); // destroy php instance $delete = &new GtkButton('Delete'); // pass object with connect_object or errors, non-object ect will occur $delete->connect_object('clicked', 'delete_message', $clist); $box1->pack_start($button, false); $box1->pack_start($delete, false); $button->set_flags(GTK_CAN_DEFAULT); $button->grab_default(); $scrolled_win->add(sent_messages()); // add the clist via its function $window->show_all(); while(gtk::events_pending()) { gtk::main_iteration(); } ?> -----Original Message----- From: Steph [mailto:steph@zend.com] Sent: 24 May 2004 15:22 To: Rhys Campbell; PHP-GTK Mailing List (E-mail) Subject: RE: [PHP-GTK] events_pending that's what user notes are there for.. > -----Original Message----- > From: Rhys Campbell [mailto:rhys.campbell@da-systems.co.uk] > Sent: 24 May 2004 14:57 > To: PHP-GTK Mailing List (E-mail) > Subject: RE: [PHP-GTK] events_pending > > > Just how to structure it into a program would be useful. Seems to > be a lot of archived mail from the list on the site about it. > > -----Original Message----- > From: nathan@the-ring.homelinux.net > [mailto:nathan@the-ring.homelinux.net] > Sent: 24 May 2004 14:53 > To: Rhys Campbell > Cc: nathan@the-ring.homelinux.net; PHP-GTK Mailing List > Subject: RE: [PHP-GTK] events_pending > > > > Can anyone put a useful example of this in the manual. Seems pretty > > important. Thanks > the exmaple you found at > http://gtk.php.net/manual/fr/gtk.method.events_pending.php > is a pretty good and perfectly sweets my needs, what are you > expecting more?? > > -- > PHP-GTK General Mailing List (http://gtk.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.gtk.general (#4557) next »