Re: GtkEntry
| From: | Markus Fischer | Date: | Fri, 21 Dec 2001 15:02:45 +0000 |
| Subject: | Re: GtkEntry | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-897@lists.php.net to get a copy of this message | ||
GtkEntry::set_text() only erquires one parameter. What type
of Object is $dbox? var_dump($dbox);
On Fri, Dec 21, 2001 at 08:52:50AM -0600, Anson Rinesmith wrote :
> 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);
> ...
> }
--
Please always Cc to me when replying to me on the lists.