ActiveState Powered by ActiveState

ActiveState Community


check option in the try area

Posted by lampi on 2007-04-30 15:25

I was trying to do something that should be simple, the thing is I have a Menu, it is working properly, and I want to add a check in one of the menu options, but I want a function that checks the real state of that option, and then return some value to the check.

It is something like this

sub test
{
# checks the state of some information and returns 1 or 0

return $state;
}

PopupMenu
{
return [
["_ Checked", \$check, test],
]
}

But this does not work, it looks like "test" is executed just the first time, when the menu is displayed.

Can someone help me ???

-->