Page 1 of 1

Cannot Use the words "yes' or 'No' in the value lists

PostPosted: Wed Dec 19, 2007 7:12 am
by nalaka
I ma trying to use 'yes' and 'no' words in valuelists as follows;

[YesNo]
Y = Yes
N = No

But the forms does not disply the required words. If I use some other word other than 'yes' or 'no' , it displays those words in the form.

Is this a limitaiton on Dataface ? I think that these words are most usefull in common data entry and these are 'must' kind of words.
Is there ny workaround for this problem ?

PostPosted: Wed Dec 19, 2007 12:36 pm
by shannah
From: http://ca.php.net/parse_ini_file
Note: There are reserved words which must not be used as keys for ini files. These include: null, yes, no, true, and false. Values null, no and false results in "", yes and true results in "1". Characters {}|&~![()" must not be used anywhere in the key and have a special meaning in the value.


Since Dataface uses INI files and the php parse_ini_file function to parse them, it is subject to these constraints.

Workarounds include:
1. Storing the valuelist in the database.
2. Defining the valuelist in the delegate class.
3. Using an alternative notation:
e.g.
Code: Select all

[YesNo]
Y=Y
N=N

or
Code: Select all
[YesNo]
Y="Yes."
N="No."


And a clever person can probably come up with something even better. You can try even just wrapping "yes" in quotes
e.g.
Y="Yes"
and see if that works.. not sure if it will.

-Steve