Page 3 of 3

Re: MENUITEM with BLOCK command executed TWICE.

Posted: Mon May 31, 2021 5:28 pm
by Horizon
:!:

Re: MENUITEM with BLOCK command executed TWICE.

Posted: Tue Jun 01, 2021 9:48 am
by Antonio Linares
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

Re: MENUITEM with BLOCK command executed TWICE.

Posted: Tue Jun 01, 2021 11:20 am
by Horizon
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


Hi Antonio,

I use unmodifed fwh libs. Can you please send me change libs.

Thank you.

Re: MENUITEM with BLOCK command executed TWICE.

Posted: Tue Jun 01, 2021 11:22 am
by Antonio Linares
Hakan,

What C compiler do you use ?

Re: MENUITEM with BLOCK command executed TWICE.

Posted: Tue Jun 01, 2021 11:34 am
by Horizon
Antonio Linares wrote:Hakan,

What C compiler do you use ?


Harbour & MSVC 2019 & FWH 21.02

Re: MENUITEM with BLOCK command executed TWICE.

Posted: Tue Jun 01, 2021 11:58 am
by Antonio Linares
Already sent to your email

Re: MENUITEM with BLOCK command executed TWICE.

Posted: Tue Jun 01, 2021 1:30 pm
by Horizon
Antonio Linares wrote:Already sent to your email


Thank you Antonio,

It solved my problem.