[LABLGTK] Trouble with message_dialog

Jacques Garrigue garrigue at math.nagoya-u.ac.jp
Mon Jun 19 03:42:56 CEST 2006


From: "Roland Laurès" <shamox at gmail.com>

> I'm trying to make an error reporting for the user with a message_dialog, I
> can display it, but when I click on Close button, the dialog window doesn't
> close itself... Here is the creation code :
> 
> let w = GWindow.message_dialog ~message:"No row selected\n Please select a
> module before trying to edit anything." ~message_type:`ERROR ~buttons:
> GWindow.Buttons.close () in
>    w#show ()
> 
> I think of forgot something, but I don't see what...

To close the window, for instance?

You shoud add:

   let res = w#run () in
   w#destroy ()

Jacques




More information about the Lablgtk-list mailing list