forcing a number to be interpreted as a field name
dochawk at gmail.com
Tue May 30 20:30:48 EDT 2017
On Tue, May 30, 2017 at 5:12 PM, Mark Schonewille via use-livecode <
use-livecode at lists.runrev.com> wrote:
> You shouldn't use numbers and constants as names for fields. One and 1 are
> identical and field "one" as well as field "1" may be interpreted as the
> first field rather than the field with name "one" or "1".
> Instead always start control names with a letter or a symbol that isn't a
I'm a very firm believer in this, and have been since HyperCard 1.0 . . .
However, the forms changed to this stupid system after my enine was
written, and I'm trying to find the way to accommodate this that both the
"least hackity" and has the smallest number of rewrites.
The least painful things that I have thought of so far are
1) a global array with names of the numeric values, and switch to working
with this for display when the datatype is integer
2) have a custom property in groups with such a translation table for the
values used when it exists
I think I actually did a good enough job in general that there is a single
handler that has to change!
But even these mean going from a super-clean rendition to a series of
similar switches . . .
Dr. Richard E. Hawkins, Esq.
More information about the Use-livecode