David,

On Sat, Jun 3, 2017 at 11:40 PM, David Adams via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> On Sun, Jun 4, 2017 at 2:40 PM, Kirk Brooks via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> > 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?

http://forums.4d.fr/Post//19516139/1/

​I bet the option on the build routine is easier and would be perfectly
acceptable for me. ​

> 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.

​Good point. Maybe what we need is just a more robust editing option? 4DPOP
isn't bad - but like you say it's a little cumbersome. And having some
tools for surveying multiple files for things like duplicates and
repetitions would be good. ​

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)
>

​I'm going to have to try that and see if it makes things easier for me. I
do like the idea of adding them on the fly. Coupled with an (interpreted
only) RELOAD CONSTANTS command it would greatly ease the headache of adding
constants early rather than later. Typically I sketch out a process (I
still use paper or a whiteboard) and then start roughing it out in 4D. Once
the fundamental actions are working I start filling in more error handling,
options and all the stuff that makes it good for users but more
complicated. Sometimes the constants I'm going to want are apparent early
on but more times than not it's not really solid until deeper in.

The reload thing is a deal on apps with an extensive startup process.

-- 
Kirk Brooks
San Francisco, CA
=======================

*The only thing necessary for the triumph of evil is for good men to do
nothing.*

*- Edmund Burke*
**********************************************************************
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:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to