Never, ever use the name of a built-in property as a custom property
Richard Gaskin
ambassador at fourthworld.com
Mon Jan 28 14:48:46 EST 2019
Geoff Canyon wrote:
> Sure, I'm not arguing for custom property sets -- just saying that if
> you *are* going to use them, don't bork the naming convention.
Names of prop sets, or the names of keys within a set?
On the latter I have mixed feelings.
As you know, I have rather a fetish about naming conventions - for
handlers, objects, and other things devs deal with.
But data is often user-facing, sometimes quite literally so, appearing
in fields and other UI elements.
Properties are arrays, and arrays are collections of name-value pairs.
And with name-value pairs, either the name or the value may be user-facing.
So as much as I find good naming conventions useful for both avoidance
of technical errors and for readability, anything user-facing cannot be
expected to have the same limitations.
If a problem arises from a key that conforms to the engine's slim
requirements (AFAIK there's only one anymore, that the key length not
exceed 255 chars), that would seem an opportunity to rethink the thing
that handles the data, rather than the data itself.
The DataGrid is a special case, since its name-value pairs are used by
developers, yet strives for easy-to-remember names for common things
like "style".
Yet even there you did a great job of rethinking the thing that handles
the data, leaving the data free to be as free as data often is.
--
Richard Gaskin
Fourth World Systems
Software Design and Development for the Desktop, Mobile, and the Web
____________________________________________________________________
Ambassador at FourthWorld.com http://www.FourthWorld.com
More information about the use-livecode
mailing list