DbCombo LostFocus() Do not Work

DbCombo LostFocus() Do not Work

Postby Ugo » Mon Jul 30, 2007 8: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:
Code: Select all  Expand view
//----------------------------------------------------------------------------//

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
User avatar
Ugo
 
Posts: 283
Joined: Sat Oct 15, 2005 6:40 am
Location: Turin, Italy

Postby James Bott » Mon Jul 30, 2007 1:14 pm

Ugo,

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

Code: Select all  Expand view
METHOD LostFocus( hWndGetFocus ) CLASS TDBCombo
   ::cSearchKey:=""
return super:LostFocus()


Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Ugo » Mon Jul 30, 2007 1: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
User avatar
Ugo
 
Posts: 283
Joined: Sat Oct 15, 2005 6:40 am
Location: Turin, Italy

Postby Ugo » Mon Jul 30, 2007 5:15 pm

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

Code: Select all  Expand view
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
User avatar
Ugo
 
Posts: 283
Joined: Sat Oct 15, 2005 6:40 am
Location: Turin, Italy

Postby James Bott » Mon Jul 30, 2007 6: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Ugo » Tue Jul 31, 2007 5: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
User avatar
Ugo
 
Posts: 283
Joined: Sat Oct 15, 2005 6:40 am
Location: Turin, Italy

Postby James Bott » Tue Jul 31, 2007 2: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Ugo » Thu Aug 09, 2007 2:35 pm

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

Code: Select all  Expand view
METHOD LostFocus( hWndGetFocus ) CLASS TDBCombo
   ::cSearchKey:=""
return super:LostFocus()


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

I do not know why in first test not work!
i'm sorry! :oops:
Ciao, best regards,
Ugo
User avatar
Ugo
 
Posts: 283
Joined: Sat Oct 15, 2005 6:40 am
Location: Turin, Italy

Postby James Bott » Thu Aug 09, 2007 2:46 pm

Ugo,

Glad to hear you got it working.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA


Return to FiveWin for Harbour/xHarbour

Who is online

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