Error in last version FWH 11.10 (Folder + get)

Re: Error in last version FWH 11.10 (Folder + get)

Postby Antonio Linares » Wed Nov 16, 2011 11:08 pm

Mauri,

With this change in Method GoNextCtrl() your example works fine. Please notice that we use IsWindowEnabled() to check for disabled controls:
Code: Select all  Expand view
METHOD GoNextCtrl( hCtrl ) CLASS TWindow

   local hCtlNext, nAt
   
   if ! Empty( ::aControls ) .and. hCtrl == ::LastActiveCtrl():hWnd .and. ;
      ! Empty( ::oWnd ) .and. ( ( Upper( ::oWnd:ClassName() ) $ "TFOLDER;TPAGES;TFOLDEREX" ) )
      hCtlNext = NextDlgTab( ::oWnd:oWnd:hWnd, ::oWnd:hWnd )
      ::hCtlFocus = hCtrl
      SetFocus( hCtlNext )
   else
      nAt = AScan( ::aControls, { | o | o:hWnd == hCtrl } )
      if nAt != 0
         nAt = If( nAt < Len( ::aControls ), nAt + 1, 1 )
         while ! lAnd( GetWindowLong( ::aControls[ nAt ]:hWnd, GWL_STYLE ), WS_TABSTOP ) .or. ;
               ! IsWindowEnabled( ::aControls[ nAt ]:hWnd )
            nAt = If( nAt < Len( ::aControls ), nAt + 1, 1 )
         end
         SetFocus( ::aControls[ nAt ]:hWnd )
      endif
   endif

return nil
regards, saludos

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

Re: Error in last version FWH 11.10 (Folder + get)

Postby mauri.menabue » Thu Nov 17, 2011 12:05 am

Antonio,

Ok ! for now :D

thank
User avatar
mauri.menabue
 
Posts: 155
Joined: Thu Apr 17, 2008 2:38 pm

Re: Error in last version FWH 11.10 (Folder + get)

Postby ukservice » Thu Nov 17, 2011 9:46 pm

Antonio,

So it is fixed?

Will you publish a revised build?.

Thanks
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
User avatar
ukservice
 
Posts: 417
Joined: Tue Feb 23, 2010 3:09 pm
Location: John

Re: Error in last version FWH 11.10 (Folder + get)

Postby Antonio Linares » Thu Nov 17, 2011 10:17 pm

John,

We will publish FWH 11.11 in a few days :-)
regards, saludos

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

Re: Error in last version FWH 11.10 (Folder + get)

Postby mauri.menabue » Tue Nov 22, 2011 3:58 pm

hi all

try this samples, with STYLE CBS_DROPDOWN does not work

Code: Select all  Expand view


#include "FiveWin.ch"

function Main()

local oDlg, oCbx, oCbx1, oCbx2
local cText  := "THREE"
local cText1 := "DUE"
local cText2 := "3"

DEFINE DIALOG oDlg FROM 10, 10 TO 20, 50 ;
TITLE "DropDown ComboBox Test"

@ 0.5, 1 COMBOBOX oCbx VAR cText STYLE CBS_DROPDOWN ;
ITEMS { "ONE", "TWO", "THREE" } ;
ON CHANGE oDlg:SetText( cText )

@ 2, 1 COMBOBOX oCbx1 VAR cText1 STYLE CBS_DROPDOWN ;
ITEMS { "UNO", "DUE", "TRE" } ;
ON CHANGE oDlg:SetText( cText1 ) when .f.

@ 3, 1 COMBOBOX oCbx2 VAR cText2 STYLE CBS_DROPDOWN ;
ITEMS { "1", "2", "3" } ;
ON CHANGE oDlg:SetText( cText2 )  

ACTIVATE DIALOG oDlg CENTERED

return nil

 


while this samples without STYLE CBS_DROPDOWN work fine

Code: Select all  Expand view


#include "FiveWin.ch"

function Main()

local oDlg, oCbx, oCbx1, oCbx2
local cText  := "THREE"
local cText1 := "DUE"
local cText2 := "3"

DEFINE DIALOG oDlg FROM 10, 10 TO 20, 50 ;
TITLE "DropDown ComboBox Test"

@ 0.5, 1 COMBOBOX oCbx VAR cText  ;
ITEMS { "ONE", "TWO", "THREE" } ;
ON CHANGE oDlg:SetText( cText )

@ 2, 1 COMBOBOX oCbx1 VAR cText1  ;
ITEMS { "UNO", "DUE", "TRE" } ;
ON CHANGE oDlg:SetText( cText1 ) when .f.

@ 3, 1 COMBOBOX oCbx2 VAR cText2 ;
ITEMS { "1", "2", "3" } ;
ON CHANGE oDlg:SetText( cText2 )  

ACTIVATE DIALOG oDlg CENTERED

return nil

 


thank
User avatar
mauri.menabue
 
Posts: 155
Joined: Thu Apr 17, 2008 2:38 pm

Re: Error in last version FWH 11.10 (Folder + get)

Postby ukservice » Tue Nov 22, 2011 4:33 pm

Thank you Antonio.

Please, this error is quite important. Without being fixed, I can´t update FWH as many of my customers use tab to complete forms and navigate into fields.

Thank you for your attention.
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
User avatar
ukservice
 
Posts: 417
Joined: Tue Feb 23, 2010 3:09 pm
Location: John

Re: Error in last version FWH 11.10 (Folder + get)

Postby ukservice » Wed Nov 23, 2011 11:07 am

Hello,

Will be fixed in Fw 11.11?.

If I can do anything to help, please indicate.

Thanks.
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
User avatar
ukservice
 
Posts: 417
Joined: Tue Feb 23, 2010 3:09 pm
Location: John

Re: Error in last version FWH 11.10 (Folder + get)

Postby Antonio Linares » Wed Nov 23, 2011 3:29 pm

Mauri,

FWH code is fine :-) The sample is wrong as you are not using WS_TABSTOP style. This is the right code for the example:

Code: Select all  Expand view
#include "FiveWin.ch"

function Main()

local oDlg, oCbx, oCbx1, oCbx2
local cText  := "THREE"
local cText1 := "DUE"
local cText2 := "3"

DEFINE DIALOG oDlg FROM 10, 10 TO 20, 50 ;
TITLE "DropDown ComboBox Test"

@ 0.5, 1 COMBOBOX oCbx VAR cText STYLE nOr( CBS_DROPDOWN, WS_TABSTOP ) ;
ITEMS { "ONE", "TWO", "THREE" } ;
ON CHANGE oDlg:SetText( cText )

@ 2, 1 COMBOBOX oCbx1 VAR cText1 STYLE nOr( CBS_DROPDOWN, WS_TABSTOP ) ;
ITEMS { "UNO", "DUE", "TRE" } ;
ON CHANGE oDlg:SetText( cText1 ) WHEN .F.

@ 3, 1 COMBOBOX oCbx2 VAR cText2 STYLE nOr( CBS_DROPDOWN, WS_TABSTOP ) ;
ITEMS { "1", "2", "3" } ;
ON CHANGE oDlg:SetText( cText2 )  

ACTIVATE DIALOG oDlg CENTERED

return nil
regards, saludos

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

Re: Error in last version FWH 11.10 (Folder + get)

Postby Antonio Linares » Wed Nov 23, 2011 3:37 pm

With this change in Class TWindow Method GoNextCtrl() we get it properly working even if the example code is wrong :-)

Included for FWH 11.11

Code: Select all  Expand view
METHOD GoNextCtrl( hCtrl ) CLASS TWindow

   local hCtlNext, nAt, nStart
   
   if ! Empty( ::aControls ) .and. hCtrl == ::LastActiveCtrl():hWnd .and. ;
      ! Empty( ::oWnd ) .and. ( ( Upper( ::oWnd:ClassName() ) $ "TFOLDER;TPAGES;TFOLDEREX" ) )
      hCtlNext = NextDlgTab( ::oWnd:oWnd:hWnd, ::oWnd:hWnd )
      ::hCtlFocus = hCtrl
      SetFocus( hCtlNext )
   else
      nAt = AScan( ::aControls, { | o | o:hWnd == hCtrl } )
      if nAt != 0
         nStart = nAt
         nAt = If( nAt < Len( ::aControls ), nAt + 1, 1 )
         while ( ! lAnd( GetWindowLong( ::aControls[ nAt ]:hWnd, GWL_STYLE ), WS_TABSTOP ) .or. ;
                 ! IsWindowEnabled( ::aControls[ nAt ]:hWnd ) ) .and. nAt != nStart
            nAt = If( nAt < Len( ::aControls ), nAt + 1, 1 )
         end
         SetFocus( ::aControls[ nAt ]:hWnd )
      endif
   endif

return nil
regards, saludos

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

Re: Error in last version FWH 11.10 (Folder + get)

Postby Rimantas » Wed Nov 23, 2011 6:11 pm

Antonio Linares wrote:With this change in Class TWindow Method GoNextCtrl() we get it properly working even if the example code is wrong :-)

Included for FWH 11.11

Code: Select all  Expand view
METHOD GoNextCtrl( hCtrl ) CLASS TWindow

   local hCtlNext, nAt, nStart
   ...
return nil


Hi Antonio ,

Get object code block bLostFocus is also not working properly . Is this related to GoNextCtrl() ? I maked changes in window.prg , added this prg to project - still isn't working ...

Regards,
Rimantas U.
User avatar
Rimantas
 
Posts: 437
Joined: Fri Oct 07, 2005 12:56 pm
Location: Utena , Lithuania

Re: Error in last version FWH 11.10 (Folder + get)

Postby Antonio Linares » Wed Nov 23, 2011 7:29 pm

Rimantas,

Please post a small example to test it.

Here, on our apps, it is working fine :-)
regards, saludos

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

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 45 guests