global problems
Eric Chatonet
eric.chatonet at sosmartsoftware.com
Tue Aug 2 16:39:35 EDT 2005
Hi all,
I was very busy and did not follow accurately this thread.
I don't speak English very well but I know what global means: global
means global :-)
If you can empty a global, delete it from memory when needed, where
is the problem?
You can use good scripting conventions to be sure that local and
global can't shadow.
Above all, we have to remember that Rev is intended to build
standalones.
IDE behaviour is another thing and IDE is not the target.
On the other hand, you have many other ways to organise data if
globals don't suit your needs: local, script local, custom
properties, external files, substacks and many others :-)
I saw very clever examples where globals are essential by Chipp and
Jacque.
But if there is a better way to go, use it ;-)
The question does not seem to be a "global" problem, but a question
about the architecture you choose.
Rev provides many ways to do the job: choose the best one!
My two cents.
Best Regards from Paris,
Eric Chatonet.
Le 2 août 05 à 22:15, J. Landman Gay a écrit :
> Mark Wieder wrote:
>
>> Jacque-
>> Tuesday, August 2, 2005, 8:07:41 AM, you wrote:
>>
>>> Globals are necessary when one has a suite of stacks that must
>>> interact
>>> as a unit. One very common example is a "find" handler. Assume a
>>> number
>>> of data stacks, each a clone of the others. A handler asks what
>>> you want
>>> to find and puts that string into a global. The next time the
>>> user wants
>>> to find something, you can use the same string to allow a persistent
>>> search across many stacks.
>>>
>> Yes, I do understand what globals are and why one may want to use
>> them. I do actually use them, albeit sparingly. My conceptual problem
>> here is with the persistence of global variables in the IDE once the
>> stack or suite of stacks that used them has been purged from memory.
>> In your example, can you think of a reason for the "find" string to
>> persist after you have closed the suite of stacks that initialized
>> and
>> used the find handler and you've gone on to work on another project?
>>
>
> Sure. How is Rev supposed to know I'm done with it? Suppose I close
> one data stack and then open another one? I still want my global
> available. I'd much rather be in charge of removing it myself.
----------------------------------------------------------------
So Smart Software
For institutions, companies and associations
Built-to-order applications: management, multimedia, internet, etc.
Windows, Mac OS and Linux... With the French touch
Free plugins and tutorials on my website
----------------------------------------------------------------
Web site http://www.sosmartsoftware.com/
Email eric.chatonet at sosmartsoftware.com/
Phone 33 (0)1 43 31 77 62
Mobile 33 (0)6 20 74 50 86
----------------------------------------------------------------
More information about the use-livecode
mailing list