Re: MENUITEM with BLOCK command executed TWICE.
Posted: Mon May 31, 2021 5:28 pm

www.FiveTechSoft.com
https://forums.fivetechsupport.com/~fivetec1/forums/
https://forums.fivetechsupport.com/~fivetec1/forums/viewtopic.php?t=40378
Code: Select all | Expand
if ::lPopup
::oMenuItemPopup = oMenuItem
else
if ValType( oMenuItem:bBlock ) == "B"
if oMenuItem:bWhen != nil .and. ! Eval( oMenuItem:bWhen, oMenuItem )
return nil
endif
::oLastItem = oMenuItem
if ::lPopup
::oMenuItemPopup = oMenuItem
endif
Eval( oMenuItem:bBlock, oMenuItem )
endif
endif
Antonio Linares wrote:Dear Hakan,
In menu.prg please make these changes: (in the "else")
line 1574:Code: Select all | Expand
if ::lPopup
::oMenuItemPopup = oMenuItem
else
if ValType( oMenuItem:bBlock ) == "B"
if oMenuItem:bWhen != nil .and. ! Eval( oMenuItem:bWhen, oMenuItem )
return nil
endif
::oLastItem = oMenuItem
if ::lPopup
::oMenuItemPopup = oMenuItem
endif
Eval( oMenuItem:bBlock, oMenuItem )
endif
endif
Your example works fine with these changes
These changes will be included in the next FWH build
Antonio Linares wrote:Hakan,
What C compiler do you use ?
Antonio Linares wrote:Already sent to your email