cross-stack globals, also, file inclusion
rcozens at pon.net
Thu Oct 23 10:05:24 EDT 2003
>Although "incorporate any changes in myConstantList.txt at runtime"
>maybe too much to hope for- would the script have to recompile
>whenever the file is changed?
Hi again, Alex.
Since I don't fully understand how Revolution's interpreter/compiler
work,I'm inclined to agree with you. Probably the best one could
hope for is to have changes in the "constant list" incorporated when
the script is applied; however this falls FAR short of the utility of
include syntax as I know it from other programming languages.
>I use custom properties as a form of global constants. I think Ken is
>correct about the include stuff...just create a custom lib stack and "start
That's all well and good for sharing handler logic, images, and resources; but
constant myConstant = myValue
in a library stack script will NOT resolve references to myConstant
in handlers in stacks that start using the library.
> I'm afraid I don't see any need for global
> constants when we've got custom properties that can do essentially the
> same thing.
Do you really see custom properties as the preferred means of
declaring constants? Suppose pi was not a built-in constant. Would
you "get the piConstant of this stack" for every stack that used pi?
Would you "get the piConstant of stack constantLibrary" or "get line
piConstantLine of the constantList of stack constantLibrary" (with
piConstantLine being another constant)?
If one must "set the piConstant of this stack to
3.14159265358979323846", what's the advantage over "constant
piConstant = 3.14159265358979323846" in the stack script?
CCW, Serendipity Software Company
"And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee."
from "The Triple Foole" by John Donne (1572-1631)
More information about the Use-livecode