Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Cancel button or Status bar
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-02-16 (17:01)
From: Angela Zhu <angela22.zhu@g...>
Subject: Cancel button or Status bar

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!

Angela Zhu
Dept. of CS, Rice University