From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=HTML_MESSAGE autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id DF100BC6B for ; Wed, 31 Oct 2007 06:21:24 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAANetJ0eAKs4Fnmdsb2JhbACCcotzAgEBBwQGERiBEw X-IronPort-AV: E=Sophos;i="4.21,349,1188770400"; d="scan'208,217";a="5304800" Received: from netscaler2.rice.edu (HELO mh1.mail.rice.edu) ([128.42.206.5]) by mail3-smtp-sop.national.inria.fr with ESMTP; 31 Oct 2007 06:21:22 +0100 Received: from mh1.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh1.mail.rice.edu (Postfix) with ESMTP id 09F23385D67 for ; Wed, 31 Oct 2007 00:21:21 -0500 (CDT) X-Virus-Scanned: by amavis-2.4.4 at mh1.mail.rice.edu Received: from mh1.mail.rice.edu ([127.0.0.1]) by mh1.mail.rice.edu (mh1.mail.rice.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PsoE6qfUPG7b for ; Wed, 31 Oct 2007 00:21:20 -0500 (CDT) Received: from [192.168.1.102] (c-98-195-25-217.hsd1.tx.comcast.net [98.195.25.217]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mh1.mail.rice.edu (Postfix) with ESMTP id B8F47385B40 for ; Wed, 31 Oct 2007 00:21:20 -0500 (CDT) Mime-Version: 1.0 (Apple Message framework v752.3) To: caml-list@yquem.inria.fr Message-Id: Content-Type: multipart/alternative; boundary=Apple-Mail-64-752513599 From: Angela Zhu Subject: GWindow message_dialog Date: Wed, 31 Oct 2007 00:21:18 -0500 X-Mailer: Apple Mail (2.752.3) X-Spam: no; 0.00; gwindow:01 gwindow:01 angela:98 angela:98 defining:02 defining:02 let:03 let:03 gui:03 gui:03 zhu:04 zhu:04 click:92 click:92 function:08 --Apple-Mail-64-752513599 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Dear all, I want to create a GWindow.message_dialog with the following functionality in my GUI: If I click on a button "reset" or "run", it prompt out a message " program is running, please wait..." And it disappear after, say, 3 seconds. (I want this message here is to let the user know the program is responding, but it will take a while before getting the result. ) I am defining a function like this: let print_sim_wait str win () = let my_message = if (str="run") then "Program running, please wait ... " else "System state resetting, please wait ... " in let diag = GWindow.message_dialog ~message_type:`INFO ~buttons:GWindow.Buttons.ok ~message: my_message ~destroy_with_parent: true ~parent:win () in let res = diag#run () = `OK in diag#destroy () However, this requires the user to click on "OK" every time to close the window. Can we set a timeline, such that the window will destroy itself after a while, without requiring any action? Thanks, Angela ------------------------------------------ Dept. of CS, Rice Unitersity http://www.cs.rice.edu/~yz2/ ------------------------------------------ --Apple-Mail-64-752513599 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1
Dear = all,

I want to create a GWindow.message_dialog with the = following functionality in my GUI:

If I click on a button "reset" or "run",
it prompt out a message " program is running, please = wait..."
And it disappear after, say, 3 = seconds.
(I want this message here is to = let the user know the program is responding, but it=A0
will take a while before getting the result. = )

I am defining = a function like this:

let = print_sim_wait str win () =3D
=A0 let my_message =3D if = (str=3D"run") then "Program running, please wait ... "
else = "System state resetting, please wait ... "
=A0 in =
=A0 let diag =3D GWindow.message_dialog = ~message_type:`INFO
= ~buttons:GWindow.Buttons.ok
~message: = my_message
~destroy_with_parent: true = ~parent:win () in
=A0 =A0 let res =3D diag#run () =3D `OK = in
= diag#destroy ()

However, this requires the user to click on "OK" = every time to close the window.
Can we set a = timeline, such that the window will=A0destroy itself after a = while,
without requiring any = action?

Thanks,
Dept. of CS, Rice Unitersity
http://www.cs.rice.edu/~yz2/
------------------------------------------

= --Apple-Mail-64-752513599--