PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Help with MenuChecked function please

I am having trouble with the "MenuChecked" function. It always appears to return "false".

My code is something like:

As expected ...
CheckMenu(idMenu$,1501,1); //this sets the check box
ShowMessage(MenuChecked(idMenu$,1501))
CheckMenu(idMenu$,1501,0); //this clears the check box
ShowMessage(MenuChecked(idMenu$,1501))

However

ShowMessage(MenuChecked(idMenu$,1501))
always reports "0" (eg false)

and the following code then does not toggle as expected;

CheckMenu(idmenu$,1501,NOT(MenuChecked(idMenu$,1501)))

I have got around the problem in the meantime by using a "global variable" to track the "checked" state and using it as the parameter to CheckMenu after performing the NOT on the global variable - rather a waste of a variable.

What am I doing wrong?

thanks
PointOfLight · 06 Jul 2004, 16:35 UTC
I decided to tinker with this a bit, since this is on my list of things to add to the documentation anyway. I don't believe you've done anything wrong. If you haven't already, I would submit this is a bug, because that's what I believe it is.
Hi,

I will look at it and fix it. Your code looks right to me.

Regards,
Kornalius