RE: [PHP-GTK] Managing Dialogs - Newbie Needs Guidence!
| From: | Mark Lopus | Date: | Thu, 18 Jul 2002 16:05:53 +0000 |
| Subject: | RE: [PHP-GTK] Managing Dialogs - Newbie Needs Guidence! | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-2267@lists.php.net to get a copy of this message | ||
I got the Teak code and will try it out...I'll let you know the results.
Thx,
--Mark
PS: I'm really starting to like this php-gtk!!!
-----Original Message-----
From: rdp@talisman.mv.com [mailto:rdp@talisman.mv.com]
Sent: Thursday, July 18, 2002 10:48 PM
To: Mark Lopus
Cc: php-gtk-general@lists.php.net
Subject: RE: [PHP-GTK] Managing Dialogs - Newbie Needs Guidence!
On Thu, 18 Jul 2002, Mark Lopus wrote:
> Rich,
>
> Thx for your reply.
>
> My close_window function is this:
>
> function close_window($widget){
> $window = $widget->get_toplevel();
> $window->hide();
> }
is $window the dialog or the main window? It looks like you're hiding the
main window not the dialog.
> I think that I need to implement a nested gtk::main() (I had previously
> thunk you coulod only have 1.)
No, you can have multiples.
> I did find some examples in the archive, but appreciate any additional
> advice.
>
> Is using nested gtk::main() calls a common way to acheive this type of
> result?
The advantage is that it halts execution of the calling code until such
time as you run gtk::quit() in the dialog.
Have a look at this:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/teak/teak/dialogs/ResultDialo
g.php?rev=1.2&content-type=text/vnd.viewcvs-markup
This is dialog in Teak that gets extended for certain uses (not meant to
be instanciated itself). The idea being that the main application calls
the start_main function, gets the result from the dialog and then
ends the gtk::main loop and destroys the dialog. The advantage here being
that the dialog is fairly stupid and the logic is elsewhere.
--rdp
--
Rich Payne
http://talisman.mv.com
--
PHP-GTK General Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php