missing documentation for dccheckbox

This forum is for eXpress++ general support.
Post Reply
Message
Author
Cliff Wiernik
Posts: 605
Joined: Thu Jan 28, 2010 9:11 pm
Location: Steven Point, Wisconsin USA
Contact:

missing documentation for dccheckbox

#1 Post by Cliff Wiernik »

I just found in dcdialog a DCSAY CHECKBOX command. However, I cannot find it in the documentation, nor can I find out what/how the TRANSFORM clause works. Roger, can you provide the documentation for the missing items.

Thanks.

Cliff

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: missing documentation for dccheckbox

#2 Post by rdonnay »

I will look at this when I get back home from the conference.
The eXpress train is coming - and it has more cars.

User avatar
Tom
Posts: 1234
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: missing documentation for dccheckbox

#3 Post by Tom »

Hi, Cliff.

That was caused by a suggestion I made many years ago with the first conversion to Xbase++/eXpress++. In Clipper-apps, we didn't have logical gets (!), so database fields contained "Y" or "N" (or in german "J" or "N") in order to work as get datasources directly. We had something like "PICTURE '!' VALID db->Field $ 'JN'", and the user had to type "J" or "N" to set the (somehow logical) value.

"DCSAY ... CHECKBOX" moves/translates a character field into a checkbox. "TRANSFORM" is an array with two elements for logical yes and logical no. Assume "db->customer" is a character field of the length 1 containing a "Y" for "yes, this is a customer" or "N" for "no, this is not a customer". This is the code to move this to a checkbox:

Code: Select all

@ 1,1 DCSAY 'Is this a customer:' GET db->customer CHECKBOX TRANSFORM {'Y','N'}
It will place a checkbox behind (!) the prompt and set it to .T. if db->customer is 'Y' and to .F. in all other cases. If the box is clicked, the data will be computed vice versa.

I don't use this anymore since all tables were converted. DCCHECKBOX is better anyway, since it places the box in front of the prompt.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

Cliff Wiernik
Posts: 605
Joined: Thu Jan 28, 2010 9:11 pm
Location: Steven Point, Wisconsin USA
Contact:

Re: missing documentation for dccheckbox

#4 Post by Cliff Wiernik »

Thanks Tom,

Bobby also has a version of the DCCHECKBOX with the prompt translated to a say and done either before or after. We do it both ways and often do manually a separate say to get around the dimming effect on the caption if you disable the checkbox. We disable it to change the appearance to indicate that it cannot be edited. However, we don't want the caption dimmed.

As for the conversion. We also had/have a similar circumstance but have not converted all the other clipper character Y/N fields. We handle it in the gather scatter to convert to a logical and back.

Cliff

Post Reply