Valid Problem

Valid Problem

Postby Colin Haig » 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: Select all  Expand view

 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
Colin Haig
 
Posts: 310
Joined: Mon Oct 10, 2005 5:10 am

Re: Valid Problem

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42082
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Valid Problem

Postby Colin Haig » Fri Jun 10, 2011 1:20 am

Hi Antonio

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

Cheers

Colin
Colin Haig
 
Posts: 310
Joined: Mon Oct 10, 2005 5:10 am

Re: Valid Problem

Postby Antonio Linares » Fri Jun 10, 2011 9:55 am

Colin,

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

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 97 guests