On Sun, Jun 4, 2017 at 2:40 PM, Kirk Brooks via 4D_Tech <
[email protected]> wrote:


> ​Since I've been using c-obj more and more for parameter passing and just
> general data handling in memory I've started using constants more than
> before for object keys exactly because of the need for keys to be exact.
> With constants the key label can be more semantic (ie: module specific
> thingy name) even when the actual key is more generic (ie: "name").
>

You've been mentioning this for some time and I eventually came around to
your point of view. 100% agreed.


> And you suggestion for being able to re-load constants is good.
>

I'm not sure what it entails on a technical level for 4D but, hopefully,
it's an easy one.


> You know what else would be good is if constants weren't stored in
> Resources but in a separate Constants folder. Why? Because they don't need
> to ship with the db if it's compiled and it's a pain to remember to remove
> them after building the compiled app.
>

Huh, interesting idea. Do you mid submitting that as a feature request and
see what we get back? I think what I'd ask for is along the lines of a
build option "Delete constants from built application/component". Something
like that. What do you think? Either way, please put in a feature request
for what you like and post a notice here so that those of us interested in
the subject can vote.


> And ultimately it would be preferable for them to be integral to 4D rather
> than as an add on. ​
>

Agreed. I've thought so since custom constants were first available in 4D
6.5. Holding breath.....I think that would mean storing them in the
struture, which has some downsides and doesn't seem to be the way 4D is
heading. I'm not sure how best they could integrate them natively in
design, but it sure would be nicer. Maybe some kind of define statement?

Define(Theme;Label;Value) // Value can be Long, String, Real, or Boolean

Define("Error Constants";"Error level is informational";1)
Define("Error Constants";"Error level is warning";2)
Define("Error Constants";"Error level is error";3)
Define("Error Constants";"Error level is critical";4)
Define("Error Constants";"Error level is fatal";5)

Thoughts?
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to