[clean-list] ObjectIO test of Identifiers etc

Diederik van Arkel vanarkel@knoware.nl
Sat, 21 Jun 2003 00:09:36 +0200


On Friday, June 20, 2003, at 11:00 PM, <alanh@dcs.kcl.ac.uk> wrote:

> If anyone cares to ofer advice, it will be welcome.
> Below is my first attempt to write a Clean program with ObjectIO
> which actually does something.  What it actually does is not what
> any good program should do.
>
> This is an experiment with one window, one button control, and
> two menus.  It was compiled and run with Clean 2.0.2 and ObjectIO 1.2.3
> under Microsoft Windows XP.
>
> The button works.
>
> The first menu is Unable when started, as intended.
>
> The second menu contains two elements:
>  - element 1 quits the program.  It works.
>  - element 2 should toggle whether menu 1 is Able or Unable.
>    When it is clicked, the whole window ceases to work.
>    The entire menu bar disappears.
>    The cursor turns into an hourglass.
>    A DOS window appears (although the program was not configured
>    with one), with a message to press any key to stop the program.
>    If this is minimised, a message appears on the main program's
>    window saying that it is not responding.
>
> What have I done wrong?

Hi Alan,

actually ObjectIO is also displaying your "Can't get a menu's select 
state." abort message,
either in a window somewhere or in your Messages file depending on your 
project settings.
This is because you are mixing up Menus and MenuElements. You want to 
be using
enableMenus,disableMenus, and getMenuSelectState rather than their 
MenuElement
versions.

HTH

Diederik van Arkel