Re: interaction between php-gtk windows
| From: | Richard Thomas | Date: | Mon, 03 Feb 2003 17:52:15 +0000 |
| Subject: | Re: interaction between php-gtk windows | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-3001@lists.php.net to get a copy of this message | ||
How he worded it was a bit insulting, he could of worded it in a little
more professional manner. However in the general "content" of things I
would have to agree.
I have been using php for the last 3 years, learned it without any real
help, never even signed up for the mailing lists to begin with,
Everything I needed was in the online manual.
Coming from that type of background in php I can truly say that the
gtk-php manual is in general confusing and slim.
On Mon, 2003-02-03 at 09:54, Rich Payne wrote:
> On Mon, 3 Feb 2003, [iso-8859-1] D. Hammerich wrote:
> > i'm new with gtk-php an have basic problem.
> > there is the following class:
> >
> > class NewWindow {
> > var $window;
> > var $field;
> > var $button;
> >
> > //Constructor
> > function NewWindow() {
> > $this->window = new GtkWindow();
> > $this->button = new GtkButton("Do something");
> > $table = &new GtkTable(2,2);
> > .... and so on
> > }
> > added some functions ...attach the widgets to the
> > table..
> > $this->window->show_all();
> > }
> >
> > //for creating an instance of NewWindow via button
> > click in my toplevel window
> > function MyNewWindow() {
> > $mywindow = &new NewWindow();
> > }
> >
> > then i connect MyNewWindow() with a button in the
> > toplevel window.
> >
> > Now MY QUESTION:
> > how can interacte these new "child"-windows with each
> > other. for example, how can i copy the content of a
> > entry of one window into the entry of the other window
> > via click
> > or how can i transfering data from the "child"-window
> > to the toplevel window via click
>
> You would need to keep track of each window's instance. Perhaps you load
> them into an array:
>
> $mywindows[] = &new NewWindow();
>
> then you can refer to them via the array:
>
> $first_window = $mywindows[1];
> $first_window_field = $first_window->field;
> $first_window_field_text = $first_window_field->get_text(0,-1);
>
> Is that what you're looking for?
>
> > i think i need a window handle to identify the window
> > i want to use. in any case - its a basic technique.
>
> Right, and the window 'handle' it what's returned from your
> &new NewWindow()
> function call.
>
> > i searched the web - nothing ! the php-gtk manual is a
> > joke,
>
> Insulting the people who write the docs (and are on list) is probably not
> the best way to get help.
>
> --rdp
>
> Rich Payne
> http://talisman.mv.com
> rdp at talisman dot mv dot com
>
>
> --
> PHP-GTK General Mailing List (http://gtk.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php