FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour DbCombo LostFocus() Do not Work
Posts: 283
Joined: Sat Oct 15, 2005 06:40 AM
DbCombo LostFocus() Do not Work
Posted: Mon Jul 30, 2007 08:02 AM
Dear friend,
the method LostFocus in DbCombo CLASS do not work fine,
is impossible to execute any instruction into a bLostFocus block!
I modified the LostFocus method
this is the new method:
//----------------------------------------------------------------------------//

METHOD LostFocus( hWndGetFocus ) CLASS TDBCombo

   local nAt := ::SendMsg( CB_GETCURSEL )

   if nAt != CB_ERR
      ::nAt = nAt + 1
      Eval( ::bSetGet, ::aItems[ ::nAt ] )
   else
      Eval( ::bSetGet, GetWindowText( ::hWnd ) )
   endif

   ::cSearchKey:=""
   
   Super:LostFocus( hWndGetFocus )

return nil

//----------------------------------------------------------------------------//


for me work fine.
Ciao, best regards,

Ugo
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
DbCombo LostFocus() Do not Work
Posted: Mon Jul 30, 2007 01:14 PM
Ugo,

Thanks for finding that and a fix. A better, and simpler, fix is this:

METHOD LostFocus( hWndGetFocus ) CLASS TDBCombo
   ::cSearchKey:=""
return super:LostFocus()


Regards,
James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 283
Joined: Sat Oct 15, 2005 06:40 AM
DbCombo LostFocus() Do not Work
Posted: Mon Jul 30, 2007 01:40 PM
James Bott wrote:Thanks for finding that and a fix.


Thanks to you for the test and the improvements :-)
Ciao, best regards,

Ugo
Posts: 283
Joined: Sat Oct 15, 2005 06:40 AM
DbCombo LostFocus() Do not Work
Posted: Mon Jul 30, 2007 05:15 PM
James Bott wrote:Thanks for finding that and a fix. A better, and simpler, fix is this:

METHOD LostFocus( hWndGetFocus ) CLASS TDBCombo
   ::cSearchKey:=""
return super:LostFocus()


James,
after the new method i have many problem with DbCombo! :-)
I replace the previous and work fine :-)

The problem is had to the dbf-code variable, to set in startup to spaces and after to have selected an item it becomes numerical :-)
Ciao, best regards,

Ugo
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
DbCombo LostFocus() Do not Work
Posted: Mon Jul 30, 2007 06:38 PM

Ugo,

I am not seeing your problem or, maybe I don't understand it.

What is the date of your \source\classes\dbcombo.prg file?

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 283
Joined: Sat Oct 15, 2005 06:40 AM
DbCombo LostFocus() Do not Work
Posted: Tue Jul 31, 2007 05:03 AM
James Bott wrote:I am not seeing your problem or, maybe I don't understand it.

What is the date of your \source\classes\dbcombo.prg file?

James,

my version is "FWHX 7.04" and dbcombo.prg is dated 2006/07/06.
Ciao, best regards,

Ugo
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
DbCombo LostFocus() Do not Work
Posted: Tue Jul 31, 2007 02:55 PM

Ugo,

>my version is "FWHX 7.04" and dbcombo.prg is dated 2006/07/06.

OK, I am using the same one. Can you create a small test program that shows the problem?

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 283
Joined: Sat Oct 15, 2005 06:40 AM
DbCombo LostFocus() Do not Work
Posted: Thu Aug 09, 2007 02:35 PM
James Bott wrote:Thanks for finding that and a fix. A better, and simpler, fix is this:

METHOD LostFocus( hWndGetFocus ) CLASS TDBCombo
   ::cSearchKey:=""
return super:LostFocus()


Dear James,
now work fine with your new LostFocus method :-)

I do not know why in first test not work!
i'm sorry! :-)
Ciao, best regards,

Ugo
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
DbCombo LostFocus() Do not Work
Posted: Thu Aug 09, 2007 02:46 PM

Ugo,

Glad to hear you got it working.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10

Continue the discussion