How to enforce all Validations

How to enforce all Validations

Postby Milan Mehta » Fri Mar 24, 2006 6:45 am

Hello All,

I have few Redefine Get with Valid clause on a Dialog. User can directly click on Ok button and skip all the valid clause ?

How can I prevent this ?

TIA
Milan.
Milan Mehta
 
Posts: 115
Joined: Mon Oct 17, 2005 4:42 am
Location: India

Postby RAMESHBABU » Fri Mar 24, 2006 7:21 am

Hi Mr.Mehta

Do not use CANCEL clause with the BUTTON if you want all gets to be validated and vice-versa in case GETs are not be validated, when any
BUTTON is pressed/clicked.

- Ramesh Babu P
User avatar
RAMESHBABU
 
Posts: 625
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Postby Frank Demont » Fri Mar 24, 2006 7:35 am

You can make a construction as :

LOKAL lok := .T.
Aeval(oDlg:aControls,{|j|lok := lok .AND. EVAL(j:bValid)})

IF lOk is .F. , at least one valid clausule hes returned .F.

Frank
Frank Demont
 
Posts: 142
Joined: Sun Oct 09, 2005 10:59 am

Postby Milan Mehta » Tue Mar 28, 2006 10:14 am

Frank Demont wrote:You can make a construction as :

LOKAL lok := .T.
Aeval(oDlg:aControls,{|j|lok := lok .AND. EVAL(j:bValid)})

IF lOk is .F. , at least one valid clausule hes returned .F.

Frank


Dear Frank,

No it does not work. It gives me error at Eval().

Can you guide me further. I am using Nov-05 build.

Witb best regards,

Milan.
Milan Mehta
 
Posts: 115
Joined: Mon Oct 17, 2005 4:42 am
Location: India

Postby Antonio Linares » Tue Mar 28, 2006 1:59 pm

local lOk := .t.

AEval( oDlg:aControls, {| j | lOk := lOk .and. If( j:bValid == nil, .t., Eval( j:bValid ) ) } )
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42120
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 30 guests