Re: Problem with GtkFixed container
| From: | Markus Fischer | Date: | Mon, 12 Nov 2001 02:06:38 +0000 |
| Subject: | Re: Problem with GtkFixed container | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-571@lists.php.net to get a copy of this message | ||
When you use connect() you'll get in addition to the parameters
you pass also the object which emited the signal as the first
one. So, your scheduling function receives:
function schedulung($main_bttn_sched, $mainappwin, $mainapp, $scrolledwindow1, $viewport1, $fixed2)
{ ..
this then results trying to call put() on the wrong object, thus
the undefined function error (because GtkFixed::put() is
implemented).
Ah yes, and GtkFixed::put() takes as first parameter an object
and as second and third the x and y coordinates.
- Markus
On Sun, Nov 11, 2001 at 05:49:59PM -0800, tmccomas@linuxfreemail.com wrote :
> Ive created a window in glade... inserted a scrollbar container with
> automatic policys... Within the scrollbar1 there is a viewport, within the
> viewport is a fixed container...
>
> Im trying to put() a widget inside the fixed container and recieve the
> following error:
>
> Call to undefined function: put()
>
> Or if i use: $fixed1->add($widget) i get this error:
>
> Gtk-CRITICAL **: file gtkviewport.c: line 635 (gtk_viewport_add):
> assertion 'bin->child == NULL' failed
>
>
> So how do I go about adding widgets to the fixed container?
>
> Attached is my code!
>
> TIA
>
>
> function scheduling($mainappwin, $mainapp, $scrolledwindow1, $viewport1,
> $fixed2) {
>
> $buttontest = &new GtkButton("Hello");
>
> $fixed2->put($buttontest);
>
>
>
> }
>
> function mainapp_win($loginwinfile, $loginwin, $uname, $pass) {
>
> print("Your username is: $uname\r\n");
>
> if(isset($loginwin)) {
>
> $loginwin = $loginwinfile->get_toplevel();
> $loginwin->hide();
>
> }
>
> $mainappwin = &new GladeXML("c:\ppmgtk\mainappwin.glade");
>
> $mainapp = $mainappwin->get_widget("mainappWin");
>
> $menu_file_quit = $mainappwin->get_widget("menu_file_quit");
>
> $menu_file_quit->connect('activate', 'quit_app');
>
> $main_bttn_sched = $mainappwin->get_widget("main_bttn_sched");
>
> $scrolledwindow1 = $mainappwin->get_widget("scrolledwindow1");
>
> $viewport1 = $mainappwin->get_widget("viewport1");
>
> $fixed2 = $mainappwin->get_widget("fixed2");
>
> $main_bttn_sched->connect('clicked', 'scheduling', $mainappwin,
> $mainapp,
> $scrolledwindow1, $viewport1, $fixed2);
>
>
> }
>
>
> Get your own FREE E-mail address at
> http://www.linuxfreemail.com
> Linux FREE Mail is 100% FREE, 100% Linux, and 100% yours!
>
> --
> PHP-GTK General Mailing List (http://gtk.php.net/)
> To unsubscribe, e-mail: php-gtk-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-gtk-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
Markus Fischer, http://guru.josefine.at/~mfischer/
EMail: mfischer@guru.josefine.at
PGP Public Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
PGP Fingerprint: D3B0 DD4F E12B F911 3CE1 C2B5 D674 B445 C227 2BD0
-All your scripts are belong to Zend-