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=1.2 required=5.0 tests=AWL,HTML_10_20,HTML_MESSAGE, SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 62394BBCA for ; Sat, 16 Feb 2008 18:01:09 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAACCmtkfAXQInh2dsb2JhbACCOjeNYgEBAQgKKZVLhgk X-IronPort-AV: E=Sophos;i="4.25,362,1199660400"; d="scan'208";a="7382332" Received: from concorde.inria.fr ([192.93.2.39]) by mail2-smtp-roc.national.inria.fr with ESMTP; 16 Feb 2008 18:01:05 +0100 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m1GH14kP028555 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Sat, 16 Feb 2008 18:01:05 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAACCmtkfRVZK2kmdsb2JhbACCOjeNYgEBAQEHBAQJChaVTYYJ X-IronPort-AV: E=Sophos;i="4.25,362,1199660400"; d="scan'208";a="8164491" Received: from wa-out-1112.google.com ([209.85.146.182]) by mail1-smtp-roc.national.inria.fr with ESMTP; 16 Feb 2008 18:01:03 +0100 Received: by wa-out-1112.google.com with SMTP id m34so1941765wag.9 for ; Sat, 16 Feb 2008 09:01:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=s/P32hoM5oot7qJBMJIDWqR9pFrKT+mjFVX7PuYpjRk=; b=cmFAGwVfNJCipBq6CAV1m36+C3lt0To6x0q8mTOrYxBuCd58/h4LSC3OQ6y86gd96i5378GkTskP/5u+bnLznVRdI9A+bdqbO9zqnpJ1hjqbqv5tINbUp1Vdauho2Fhr2PBiZTktOhGxQSFCvSo95ZftE92YDXHfV2mEyFVhcSY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=WBwmXv/JBd5ajEDdexFMBlfuntv5TGuKZTzCTH8j/I2ukAv47n53Anq17tD28cFZPOEEBjjNBLzf7tsaVkRJ0BCk1YdWhXSHlW9a2iDHubS5YdcUjBJmILlF3maeSr5B9eERN/+ou3UNSJRc3suPeFzyRi74eHWNaJuvIgIY3eQ= Received: by 10.114.89.1 with SMTP id m1mr425788wab.77.1203181262325; Sat, 16 Feb 2008 09:01:02 -0800 (PST) Received: by 10.114.182.17 with HTTP; Sat, 16 Feb 2008 09:01:02 -0800 (PST) Message-ID: Date: Sat, 16 Feb 2008 11:01:02 -0600 From: "Angela Zhu" To: caml-list@inria.fr Subject: Cancel button or Status bar MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_5908_20931572.1203181262320" X-Miltered: at concorde with ID 47B716D0.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 ocaml:01 angela:98 angela:98 22.:98 terminate:01 terminate:01 computation:01 computation:01 impractical:02 impractical:02 gui:03 gui:03 zhu:04 zhu:04 ------=_Part_5908_20931572.1203181262320 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, I am using OCaml to develop an interpreter with a GUI. In the GUI, I have a "run" button, where when you click it, it will call a function, say "eval prog1". Some time, the running time of "eval prog1" can be long, and in case I want to add to the GUI the functionality that, when click on another "cancel" button, it will terminate the computation/evaluation immediately. (The user might don't want to wait until the execution to finish. ) Anyone have some idea how to achieve this? If this is impractical in OCaml, then how can I generate a "status bar", which indicates how much of the program (e.g. in percentage) has been finished, so you can have an estimation on how much more you need to wait for the program to finish. Thanks a lot in advance! -- Regards, Angela Zhu ------------------------------------------ Dept. of CS, Rice University http://www.cs.rice.edu/~yz2/ ------------------------------------------ ------=_Part_5908_20931572.1203181262320 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi,

I am using OCaml to develop an interpreter with a GUI.
In the GUI, I have a "run" button, where when you click it, it
will call a function, say "eval prog1".

Some time, the running time of "eval prog1" can be long, and
in case I want to add to the GUI the functionality that,
when click on another "cancel" button, it will terminate the
computation/evaluation immediately. (The user might don't
want to wait until the execution to finish. )

Anyone have some idea how to achieve this?

If this is impractical in OCaml, then how can I generate a
"status bar", which indicates how much of the program
(e.g. in percentage) has been finished, so you can have
an estimation on how much more you need to wait for the program
to finish.

Thanks a lot in advance!
 
--
Regards,
Angela Zhu
------------------------------------------
Dept. of CS, Rice University
http://www.cs.rice.edu/~yz2/
------------------------------------------ ------=_Part_5908_20931572.1203181262320--