Page 1 of 2
Problem in barmenu in FWH 20.12
Posted: Mon Jan 04, 2021 3:15 pm
by driessen
Hello,
Since I use FWH 20.12, my menuitems in my pulldownmenu's aren't working anymore. There is no reaction at all.
But when I go back to FWH 20.08, everything is working normally.
What has been changed?
Thank you.
Re: Problem in barmenu in FWH 20.12
Posted: Mon Jan 04, 2021 3:30 pm
by cnavarro
Please put little sample your command used for define barmenus
Re: Problem in barmenu in FWH 20.12
Posted: Mon Jan 04, 2021 3:49 pm
by driessen
Thank you for your reply.
It is not a small example. It's quite a huge one. But it runs just fine for many years now. I hope you can make something out of it.
Re: Problem in barmenu in FWH 20.12
Posted: Mon Jan 04, 2021 4:00 pm
by karinha
My God! I've never seen anything like this logic. Amazing. I understood nothing.
Regards.
Re: Problem in barmenu in FWH 20.12
Posted: Mon Jan 04, 2021 5:38 pm
by Antonio Linares
Dear Michel,
We did some changes in the menus in FWH 20.12 so obviously there is something to fix on our side
We apologize for these inconveniencies and we are going to publish a revised version asap
many thanks
Re: Problem in barmenu in FWH 20.12
Posted: Mon Jan 04, 2021 5:45 pm
by driessen
Antonio,
A very happy new year to you. Keep sound and safe.
Thanks a lot. I'm looking forward to the revision.
Re: Problem in barmenu in FWH 20.12
Posted: Mon Jan 04, 2021 6:31 pm
by cnavarro
Does that happen with all styles? (none, 2007, 2010, 2013, 2015)
I could put an image or better a gif of your problem?
Re: Problem in barmenu in FWH 20.12
Posted: Mon Jan 04, 2021 6:56 pm
by driessen
No matter what I do, nothing happens if I make a choice in one of my menues.
I got the impression that Antonio knows what is wrong.
Re: Problem in barmenu in FWH 20.12
Posted: Mon Jan 04, 2021 9:27 pm
by cnavarro
Does this mean that you cannot perform any action from the menu items?
Re: Problem in barmenu in FWH 20.12
Posted: Mon Jan 04, 2021 10:00 pm
by driessen
Indeed, nothing happens. No reaction at all.
I added MsgInfo() before and behind the action that has to be performed.
Even not the Msginfo() do happen.
Re: Problem in barmenu in FWH 20.12
Posted: Tue Jan 05, 2021 2:39 am
by RAMESHBABU
Since I use FWH 20.12, my menuitems in my pulldownmenu's aren't working anymore. There is no reaction at all.
But when I go back to FWH 20.08, everything is working normally.
I am also using 20.12, My application's pulldown menus or buttonbars are working normally like the way they were
working in previous verions.
This is Just for your information.
-Ramesh Babu P
Re: Problem in barmenu in FWH 20.12
Posted: Tue Jan 05, 2021 2:50 am
by cnavarro
Ramesh Babu, Thanks for the info.
Re: Problem in barmenu in FWH 20.12
Posted: Tue Jan 05, 2021 6:45 am
by Horizon
driessen wrote:Indeed, nothing happens. No reaction at all.
I added MsgInfo() before and behind the action that has to be performed.
Even not the Msginfo() do happen.
Hi Mr. Navarro,
I confirm the error. it is same for me in fwh 20.12.
Code: Select all
MENU oFaizMenu POPUP 2007
MENUITEM "Parametreler" ACTION Parametre_FAIZ()
SEPARATOR
---->>> this part
FOR hh:=1 TO 19
hhh:="oApp:GParam:xADI_"+ALLTRIM(STR(hh))
hhh1 := ALLTRIM(&hhh)
IF !EMPTY(Hhh1)
MENUITEM hhh1 BLOCK GenBlock_Faiz(hh)
ENDIF
Next hh
----> this part
SEPARATOR
MENUITEM "YENİ FAİZLER" ACTION Faizler() //Parametre_FAIZ()
SEPARATOR
MENUITEM "Faiz Güncelleme (EVDS)" ACTION Faiz_Update()
ENDMENU
Code: Select all
FUNCTION GenBlock_Faiz(nhh)
LOCAL cProc := "Faiz"+ALLTRIM(STR(nhh))
RETURN {|| &(cProc)() }
Re: Problem in barmenu in FWH 20.12
Posted: Tue Jan 05, 2021 3:01 pm
by cnavarro
Replace METHOD Command in Class TMenu with this and try
( My apologies, I forgot to update the MENU.PRG file in the repository )
Code: Select all
//----------------------------------------------------------------------------//
METHOD Command( nCommand ) CLASS TMenu
local oMenuItem := ::GetMenuItem( nCommand )
if oMenuItem != nil
if oMenuItem:lRadio
oMenuItem:SetRadioMenuItem( nCommand )
else
if ::lUserRadio
if lAnd( GetMenuState( ::hMenu, nCommand, MF_BYCOMMAND ), MF_CHECKED )
oMenuItem:SetCheck( .F. )
else
oMenuItem:SetCheck( .T. )
endif
endif
endif
if ValType( oMenuItem:bAction ) == "B"
if oMenuItem:bWhen != nil .and. ! Eval( oMenuItem:bWhen, oMenuItem )
return nil
endif
::oLastItem = oMenuItem
if ::lPopup
::oMenuItemPopup = oMenuItem
else
if oMenuItem:bAction != nil
if ValType( oMenuItem:bBlock ) == "B"
Eval( oMenuItem:bBlock, oMenuItem )
endif
Eval( oMenuItem:bAction, oMenuItem )
else
if ValType( oMenuItem:bBlock ) == "B"
Eval( oMenuItem:bBlock, oMenuItem )
endif
Eval( oMenuItem:OnClick, ::oWnd, oMenuItem )
endif
endif
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
endif
return nil
//----------------------------------------------------------------------------//
Sample
Code: Select all
#include "Fivewin.ch"
Function Main()
local oWnd
local oMnu
DEFINE WINDOW oWnd ;
TITLE "Test Menu" + " - Ver.: " + FWVERSION + if( IsExe64(), ;
" ( 64", " ( 32" ) + " bits ) - " + FWString( "User" ) + ;
": " + WNetGetUser() + " - " + hb_Compiler() ;
MENU ( oMnu := MenuTest() )
ACTIVATE WINDOW oWnd MAXIMIZED
Return nil
Function MenuTest()
local oMnu
MENU oMnu 2007
MENUITEM "One"
MENU
MENUITEM "First" BLOCK { || MsgInfo( "Hello" ) }
SEPARATOR
MENUITEM "Two" ACTION MsgInfo( "Bye" )
ENDMENU
ENDMENU
Return oMnu
Re: Problem in barmenu in FWH 20.12
Posted: Tue Jan 05, 2021 3:47 pm
by Horizon
Hi,
Is it possible to mail related lib file for fwh 20.12?
hakan @ objekt . com . tr