FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Valid Problem
Posts: 310
Joined: Mon Oct 10, 2005 05:10 AM
Valid Problem
Posted: Thu Jun 09, 2011 11:29 PM
I have just recently upgraded from FWH 9.12 to 11.5

I have a get on a button bar with a valid clause and when I hit the enter key the valid in not processed but if I exit the
screen the valid is processed. I went back to 9.12 and tested and it worked as expected.

Code (fw): Select all Collapse
 DEFINE BUTTON oBtn6 of oBar RESOURCE "EYE" ;
   FLAT;
   PROMPT 'Find' ;
   ACTION(cFindItem := space(len(oStock:code)),oStock:SetOrder('CODE'),oFindItem:SetPos(0),oFindItem:Show(),oFindItem:SetFocus());
   TOOLTIP('Find Item')

   @ 12,300 GET oFindItem VAR cFindItem picture '@!'of oBar;
   UPDATE;
   SIZE 75,20 ;
   FONT oFont ;
   VALID(MSgInfo('here'),TRUE) ;   // VALID NOT PROCESSED
   PIXEL
   oFindItem:Set3DLook()



Cheers

Colin
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Valid Problem
Posted: Fri Jun 10, 2011 12:06 AM

Colin,

In order to get the VALID evaluated a control should loose focus to another control, if there are no other controls that receive the focus then you may try this:

oGet:bKeyDown = { | nKey | If( nKey == VK_RETURN, Eval( oGet:bValid ),) }

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 310
Joined: Mon Oct 10, 2005 05:10 AM
Re: Valid Problem
Posted: Fri Jun 10, 2011 01:20 AM

Hi Antonio

Thanks that worked - but my old code worked fine in FWH 9.12

Cheers

Colin

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Valid Problem
Posted: Fri Jun 10, 2011 09:55 AM

Colin,

Probably in 9.12 some other control was receiving the focus and should not :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion