cross-stack globals, also, file inclusion

Joel Rees joel at
Thu Oct 23 00:20:33 EDT 2003

> Global constant proponents might think its usage wordy, though.

In fact, wordiness is one of the things I would like to avoid.

Using a handler as an accessor function actually would achieve the
functional aspects for what I was wanting, but I hesitate at something
like this:

    put "ResultsPath" in line 1 of theTemp
    put theUserName in line 2 of theTemp
    send "giveMeThePath theTemp" to stack appConstantsStack
    put the result into myResultsPath

Since the path to appConstantsStack apparently can't be relative, this
technique becomes fragile, as well as wordy. You have to assume that
appConstantsStack (or perhaps the main stack) has run and sent the
message with the absolute path of the appConstantsStack to all the
independent sub stacks, or you have to use some long and convoluted
algorithm to go hunting for it, and that algorithm has to be implemented
in every independent sub stack. 

Substacks in the same file, of course, are not nearly as problematic.
Sometimes substacks in the same file seem counter-indicated, however.

Joel Rees, programmer, Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan

"When software is patentable, anything is patentable." 

More information about the Use-livecode mailing list