cross-stack globals, also, file inclusion

Ken Ray kray at sonsothunder.com
Thu Oct 23 00:53:34 EDT 2003


Joel,

How about the appConstantsStack be a library? That way you can open it
with "start using"; it can initialize itself "on libraryStack"; and you
can call on its handlers directly:

  put giveMeThePath(theTemp) into myResultsPath

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/ 

> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com 
> [mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of 
> Joel Rees
> Sent: Wednesday, October 22, 2003 11:21 PM
> To: How to use Revolution
> Subject: Re: cross-stack globals, also, file inclusion
> 
> 
> > 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 
> http://www.alpsgiken.co.jp
> ----------------------
> 
> "When 
> software is patentable, anything is patentable." 
> (http://swpat.ffii.org)
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com 
> http://lists.runrev.com/mailman/listinfo/use-> revolution
> 




More information about the use-livecode mailing list