Page 1 of 1

Behaviour of button class in FWH 11.12

Posted: Thu Jan 12, 2012 10:54 am
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.

Re: Behaviour of button class in FWH 11.12

Posted: Thu Jan 12, 2012 1:15 pm
by tiaofw
Good day!

The reported problem that also happened with me!

thank you

Re: Behaviour of button class in FWH 11.12

Posted: Thu Jan 12, 2012 3:23 pm
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

Re: Behaviour of button class in FWH 11.12

Posted: Thu Jan 12, 2012 4:13 pm
by Antonio Linares
Michel,

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

We apologize for it

Re: Behaviour of button class in FWH 11.12

Posted: Thu Jan 12, 2012 9:32 pm
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

Re: Behaviour of button class in FWH 11.12

Posted: Thu Jan 12, 2012 9:47 pm
by Antonio Linares
In FWH 11.10 is working fine...

Re: Behaviour of button class in FWH 11.12

Posted: Thu Jan 12, 2012 10:01 pm
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! :-)

Re: Behaviour of button class in FWH 11.12

Posted: Thu Jan 12, 2012 10:50 pm
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

Re: Behaviour of button class in FWH 11.12

Posted: Thu Jan 12, 2012 11:01 pm
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
 

Re: Behaviour of button class in FWH 11.12

Posted: Thu Jan 12, 2012 11:04 pm
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

Re: Behaviour of button class in FWH 11.12

Posted: Thu Jan 12, 2012 11:38 pm
by Enrico Maria Giordano
Ok, now it's clear, thank you.

EMG