DCSAY... GET .... VALID ... question

This forum is for eXpress++ general support.
Message
Author
User avatar
unixkd
Posts: 576
Joined: Thu Feb 11, 2010 1:39 pm

Re: DCSAY... GET .... VALID ... question

#11 Post by unixkd »

Hi Skiman

Could kindly post your solution to this problem.

Thanks

Joe

skiman
Posts: 1198
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: DCSAY... GET .... VALID ... question

#12 Post by skiman »

Hi,

This is the system I use:
- Popup sets the cargo of the GET to .T..
- Valid checkes if the cargo is set and if there was a change. If not, the valid returns .T. without processing the valid code. Make sure it sets the cargo to .F..
- GETEVAL sets the cargo to .F. as default

Code: Select all

@ 1,1 DCSAY "TEST:  GET cTest;
	VALID {|oGet,o, lOk,lReturn| lReturn:=!oGet:get:cargo .and. !oGet:get:changed,oGet:get:cargo:=.F.,iif(lReturn,.t.,(...) } 
	POPUP {|o,oGet| oGet:get:cargo:=.T.,...} ;
	GETEVAL {| oGet| oGet:get:cargo:=.F. }  ;
	... 
Best regards,

Chris.
www.aboservice.be

User avatar
unixkd
Posts: 576
Joined: Thu Feb 11, 2010 1:39 pm

Re: DCSAY... GET .... VALID ... question

#13 Post by unixkd »

Hi Skiman

Thanks for your response.

Your above code not working.

My validation code in the valid clause is

Iif(empty(o:getdata(), msgbox("item empty",nil)

Could you please review your code and give me a complete sample based on my validation.

I also noticed that you declared o and lol in the valid clause but not used.

Thanks

Joe

skiman
Posts: 1198
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: DCSAY... GET .... VALID ... question

#14 Post by skiman »

Hi,

I use this code without any problem. The o and lOk are used in the complete valid clause, which is not executed when nothing is changed.

The code is a snippet out of my application. I don't have a standalone sample.
Best regards,

Chris.
www.aboservice.be

Post Reply