GtkEntry
| From: | (Anson Rinesmith) | Date: | Fri, 21 Dec 2001 14:52:50 +0000 |
| Subject: | GtkEntry | ||
| Groups: | php.gtk.general | ||
| Request: | Send a blank email to php-gtk-general+get-895@lists.php.net to get a copy of this message | ||
I am getting the following error message when trying to call a function to
modify text in a GtkEntry
Warning: set_text() requires exactly 3 arguments, 1 given in c:\gui.php on line 30
Enclosed is some relevant code, I know it's probably more than most people send, but
I wanted everyone to see anything that might be affecting the function.
function fill_entry($dbox){
$dbox->set_text("Data Chosen");
}
...
function show_rules(){
global $rules_window;
$box1 = &new GtkVBox();
$rules_window->add($box1);
$frame1 = &new GtkFrame('CURRENT WINDOW');
$box1->pack_start($frame1,false);
$label = &new GtkLabel('FIREWALL RULES');
$frame1->add($label);
$frame2 = &new GtkFrame('Current Rules');
$box1->pack_start($frame2,true);
$scrolled_win = &new GtkScrolledWindow();
$scrolled_win->set_border_width(5);
$scrolled_win->set_policy(GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
$frame2->add($scrolled_win);
$frame3 = &new GtkFrame();
$box1->pack_start($frame3,false);
$fw_data_box = &new GtkEntry();
$frame3->add($fw_data_box);
$fw_data_box->set_text("TEST");
$frame4 = &new GtkFrame('Options');
$box1->pack_start($frame4,false);
$delete_button = &new GtkButton('DELETE');
$frame4->add($delete_button);
$frame5 = &new GtkFrame();
$box1->pack_start($frame5,false);
$add_button = &new GtkButton('ADD');
$frame5->add($add_button);
...
$clist = &new GtkCList(count($keys), $keys);
$clist->set_selection_mode(GTK_SELECTION_SINGLE);
$clist->connect('click_column', 'clist_click_column');
$clist->connect('select-row','get_selection',&$clist);
$clist->connect('select-row','fill_entry',&$fw_data_box);
...
}