Behaviour of button class in FWH 11.12

Behaviour of button class in FWH 11.12

Postby driessen » Thu Jan 12, 2012 10:54 am

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. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Behaviour of button class in FWH 11.12

Postby tiaofw » Thu Jan 12, 2012 1:15 pm

Good day!

The reported problem that also happened with me!

thank you
Contagem/Brazil
FWH/xharbour 15.12/PELLES C, MED, DBF
tiaofw
 
Posts: 99
Joined: Fri Dec 12, 2008 4:39 pm
Location: Brasil

Re: Behaviour of button class in FWH 11.12

Postby carlos vargas » Thu Jan 12, 2012 3:23 pm

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

viewtopic.php?p=124275#p124275

salu2
carlos vargas
Salu2
Carlos Vargas
Desde Managua, Nicaragua (CA)
User avatar
carlos vargas
 
Posts: 1720
Joined: Tue Oct 11, 2005 5:01 pm
Location: Nicaragua

Re: Behaviour of button class in FWH 11.12

Postby Antonio Linares » Thu Jan 12, 2012 4:13 pm

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: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Behaviour of button class in FWH 11.12

Postby Antonio Linares » Thu Jan 12, 2012 9:32 pm

Michel,

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

Code: Select all  Expand view
#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: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Behaviour of button class in FWH 11.12

Postby Antonio Linares » Thu Jan 12, 2012 9:47 pm

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

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

Re: Behaviour of button class in FWH 11.12

Postby Antonio Linares » Thu Jan 12, 2012 10:01 pm

This is the required fix in Class TButton:

Code: Select all  Expand view
  METHOD GetDlgCode( nLastKey ) INLINE ::oWnd:nLastKey := nLastKey, nil // DLGC_WANTALLKEYS
 


Thanks! :-)
regards, saludos

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

Re: Behaviour of button class in FWH 11.12

Postby Enrico Maria Giordano » Thu Jan 12, 2012 10:50 pm

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
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Behaviour of button class in FWH 11.12

Postby carlos vargas » Thu Jan 12, 2012 11:01 pm

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

o no le capto. :oops:
Code: Select all  Expand view

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
carlos vargas
 
Posts: 1720
Joined: Tue Oct 11, 2005 5:01 pm
Location: Nicaragua

Re: Behaviour of button class in FWH 11.12

Postby Antonio Linares » Thu Jan 12, 2012 11:04 pm

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
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain



Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 45 guests