This forum is for eXpress++ general support.
RDalzell
Posts: 205 Joined: Thu Jan 28, 2010 6:57 am
Location: Alsip, Illinois USA
#1
Post
by RDalzell » Sun Nov 04, 2012 9:22 am
Hi Roger,
Something recently observed
The DCGET VALID does not get called if paired with WHEN
Using xBase++ 1.90 355 and eXpress 1.9 257
\
Code: Select all
@ 1.00,24.00 DCGET nJudge Picture '9999' PARENT oGroup3a COLOR GRA_CLR_BLUE ;
TABSTOP ;
GETID "Get_nJudge" ;
WHEN {|| nJudge == 0 } ;
TABGROUP XBP_BEGIN_GROUP ;
VALID {|| ValidateJudge(nJudge, GetList) } ;
POPUP {|n| n := JudgeScan(nJudge, GetList) } ;
MESSAGE 'Enter The Hearing Officer ID Number to be Maintained.' INTO oMsgBox
Rick
rdonnay
Site Admin
Posts: 4813 Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:
#2
Post
by rdonnay » Sun Nov 04, 2012 9:57 am
Valid codeblocks do not get evaluated if the WHEN clause code block returns a .f.
I'm reluctant to change this behavior because it has been the default behavior in eXpress++ for 12 years.
It appears that you do not want JUDGE to be edited after the first time a value is entered.
I can't think of a simple solution.
What does the validation do?
The eXpress train is coming - and it has more cars.
RDalzell
Posts: 205 Joined: Thu Jan 28, 2010 6:57 am
Location: Alsip, Illinois USA
#3
Post
by RDalzell » Sun Nov 04, 2012 11:45 am
Simply return the values for the record to be edited.
It appears that the WHEN functions if it is not the specific value of the DCGET as in the following example:
Code: Select all
@ 1.00,21.00 DCGET cCode Picture '@!' PARENT oGroup COLOR GRA_CLR_BLUE ;
TABSTOP ;
GETID "Get_cCode" ;
WHEN {|| nGroup == 1 } ;
TABGROUP XBP_BEGIN_GROUP ;
VALID {|| ValidateCode(cCode, cRecId, GetList) } ;
POPUP {|c| c := GuiCodeScan(c, cRecId, cText, GetList) } ;
MESSAGE 'Enter The ' + cText + ' Code To Be Maintained.' INTO oMsgBox
No problem, I can code around this.
How are the teeth feeling?
Thanks,
Rick
rdonnay
Site Admin
Posts: 4813 Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:
#4
Post
by rdonnay » Sun Nov 04, 2012 1:47 pm
I'm feeling great! After 3 trips to Mexico in 3 years I now have a pretty good set of teeth.
We're having another devcon in AZ next year in October. Hope you will be there.
The eXpress train is coming - and it has more cars.
RDalzell
Posts: 205 Joined: Thu Jan 28, 2010 6:57 am
Location: Alsip, Illinois USA
#5
Post
by RDalzell » Mon Nov 05, 2012 6:21 am
I would have liked to been there this year, but the time frame conflicted with other events.
While I certainly missed seeing those attending, I was uncertain of the benefit of attending except the social aspect of seeing old friends.
I really liked your eXpress Devcon in Boise because xBase is the car, but eXpress is what drives us.
Glad to hear and looking forward to seeing your smile.
Rick
GeneB
Posts: 158 Joined: Sun Jan 31, 2010 8:32 am
Location: Albuquerque, New Mexico, USA
Contact:
#6
Post
by GeneB » Mon Nov 05, 2012 7:37 pm
Valid codeblocks do not get evaluated if the WHEN clause code block returns a .f.
This solved a problem I worked on for hours. I finally discovered a VALID was changing a variable in another GET and I didn't know how to prevent it. After I saw this topic I used WHEN{||.f.} in tandem with HIDE{||.t.} and it worked as I wanted.
Please don't change the way it works. Perhaps a VALIDWHEN parameter could be added instead.
It isn't always asking questions that make this forum so valuable to me. Thank you and everyone for all your input. I learn from every question.
bwolfsohn
Posts: 649 Joined: Thu Jan 28, 2010 7:07 am
Location: Alachua, Florida USA
Contact:
#7
Post
by bwolfsohn » Mon Nov 05, 2012 8:09 pm
RDalzell wrote: I really liked your eXpress Devcon in Boise because xBase is the car, but eXpress is what drives us.
Rick
Where's the damn like button on this BB ??
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises
rdonnay
Site Admin
Posts: 4813 Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:
#8
Post
by rdonnay » Mon Nov 05, 2012 8:43 pm
like.jpg (8.4 KiB) Viewed 11990 times
The eXpress train is coming - and it has more cars.