Behaviour of button class in FWH 11.12

Post Reply
User avatar
driessen
Posts: 1239
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Behaviour of button class in FWH 11.12

Post by driessen »

Hello,

Since I use FWH 11.12, I experienced another behaviour in the button class.

I often use "&" in a button to make it easier for a user to activate a button by using the ALT-key.

It always used to work fine. For instance, if I put "&Add" in a button, the user presses ALT-A on his keyboard to activate the button after which the action is performed.

But since 11.12, pressing ALT-A is only setting the focus on the button, but the action behind the button is not executed.

Why is that? Can we have the old behaviour back?

Thanks a lot in advance.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
tiaofw
Posts: 97
Joined: Fri Dec 12, 2008 4:39 pm
Location: Brasil
Contact:

Re: Behaviour of button class in FWH 11.12

Post by tiaofw »

Good day!

The reported problem that also happened with me!

thank you
Contagem/Brazil
FWH/xharbour 15.12/PELLES C, MED, DBF
User avatar
carlos vargas
Posts: 1421
Joined: Tue Oct 11, 2005 5:01 pm
Location: Nicaragua

Re: Behaviour of button class in FWH 11.12

Post by carlos vargas »

this is the only change in tbutton class in version 11.12
can you try revert the change and test.

http://forums.fivetechsupport.com/viewt ... 75#p124275

salu2
carlos vargas
Salu2
Carlos Vargas
Desde Managua, Nicaragua (CA)
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Behaviour of button class in FWH 11.12

Post by Antonio Linares »

Michel,

It is a FWH 11.12 bug, we are searching for it, thanks

We apologize for it
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Behaviour of button class in FWH 11.12

Post by Antonio Linares »

Michel,

This example is also failing with FWH 11.11 so it seems as the bug was introduced before 11.11:

Code: Select all

#include "FiveWin.ch"

function Main()

   local oDlg, cTest := "Hello"

   DEFINE DIALOG oDlg
   
   @ 1, 1 GET cTest
   
   @ 3, 10 BUTTON "&Ok" ACTION MsgInfo( "test" )

   ACTIVATE DIALOG oDlg CENTERED

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Behaviour of button class in FWH 11.12

Post by Antonio Linares »

In FWH 11.10 is working fine...
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Behaviour of button class in FWH 11.12

Post by Antonio Linares »

This is the required fix in Class TButton:

Code: Select all

   METHOD GetDlgCode( nLastKey ) INLINE ::oWnd:nLastKey := nLastKey, nil // DLGC_WANTALLKEYS
 
Thanks! :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Behaviour of button class in FWH 11.12

Post by Enrico Maria Giordano »

Antonio Linares wrote:This example is also failing with FWH 11.11
I'm using FWH 11.11 and your sample works fine here. Why?

EMG
User avatar
carlos vargas
Posts: 1421
Joined: Tue Oct 11, 2005 5:01 pm
Location: Nicaragua

Re: Behaviour of button class in FWH 11.12

Post by carlos vargas »

Antonio, este metodo en tget, todas las posibilidaes retornan WANTALLKEYS, no tiene sentido
que opinas?

o no le capto. :oops:

Code: Select all

METHOD GetDlgCode( nLastKey ) CLASS TGet

   if Len( ::oWnd:aControls ) == 1
      return DLGC_WANTALLKEYS
   endif

   ::oWnd:nLastKey = nLastKey

   if ::oWnd:IsKindOf( "TXBROWSE" )
      return DLGC_WANTALLKEYS
   else
      if ::oWnd:oWnd != nil .and. ;
         ::oWnd:oWnd:ClassName() $ "TFOLDER,TFOLDEREX,TMDICHILD,TWINDOW,TDIALOG"
         return DLGC_WANTALLKEYS
      endif
   endif

return DLGC_WANTALLKEYS
 
Last edited by carlos vargas on Thu Jan 12, 2012 11:26 pm, edited 1 time in total.
Salu2
Carlos Vargas
Desde Managua, Nicaragua (CA)
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Behaviour of button class in FWH 11.12

Post by Antonio Linares »

Enrico Maria Giordano wrote:
Antonio Linares wrote:This example is also failing with FWH 11.11
I'm using FWH 11.11 and your sample works fine here. Why?

EMG
Enrico,

Surely you were using an early 11.11 that got modified little later
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply