To: Jacques GARRIGUE Cc: lablgtk at math.nagoya-u.ac.jp Subject: Re: How to display and remove a window? References: <87r7enk0me.fsf at linux-france.org> <878y0q43to.fsf@linux-france.org> <20050702.070704.68546750.garrigue@kurims.kyoto-u.ac.jp> From: David MENTRE Organization: none Date: Sat, 02 Jul 2005 12:18:52 +0200 In-Reply-To: <20050702.070704.68546750.garrigue at kurims.kyoto-u.ac.jp> (Jacques GARRIGUE's message of "Sat, 02 Jul 2005 07:07:04 +0900 (JST)") Message-ID: <87hdfdbjeb.fsf at linux-france.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Hello Jacques, Jacques GARRIGUE writes: > Sure: the gtk main loop is not running. > If you want to experiment with events, you should use > lablgtk2 -thread. Ok, I understand, thanks. I tried following code: let display_message_without_dialog message = let window = GWindow.message_dialog ~message ~message_type:`INFO ~buttons:GWindow.Buttons.ok ~modal:false () in ignore(window#show ()); window let remove_message_without_dialog window = window#destroy () It works under "lablgtk2 -thread". BTW, any idea how I could avoid the "Ok" button and have no button at all? But it does not work as I would like in my program. The window is not displayed, because, at that time in my program, the GMain.Main.main is not yet called. And I can't call GMain.Main.main yet because this call is blocking and I'm in the processing of doing job to prepare the windows. Without threading, I think I can't do what I want. :( But maybe there is a way to schedule some work to be done? Anyway, many thanks for your help, Yours, d. -- pub 1024D/A3AD7A2A 2004-10-03 David MENTRE 5996 CC46 4612 9CA4 3562 D7AC 6C67 9E96 A3AD 7A2A