In large projects, I combine single globals in a global list. i guess
this gives no performance advantage but it makes it easier to work with.
consider this:
lPrefs=[#serial: 234, #user: "Herman", #timeOnline: 2343] etc
In this way, I use 4 or 5 lists with releated globals and I don't have
any RAM or performance problems with maybe 300 globals.
regards, Florian
Irv Kalb wrote:
>
> Three answers:
>
> First, I agree with Chris' comment for using about 100 global
> variables, there should be no problem with that many (as long as you
> can remember what each one does :) ). While V12 is an excellent
> product, using it to save a large number of global variables would be
> not be the best use of it.
>
> Next, if you are looking for a way to write out variables and read
> them back in at the beginning of the next session, and you are
> already using or considering using a cast file on the user's hard
> disk, please read my article on DOUG on "Data cast members" at:
>
> http://www.director-online.com/accessArticle2.cfm?id=442
>
> Finally, if you find that you have large numbers of global variables,
> one overall design approach would be to start getting into object
> oriented programming. Using OOP you can easily reduce the number of
> globals by identifying and grouping related variables (and handlers)
> into global objects. When you do this, the variables change from
> begin individual globals into a single global object with a bunch of
> property variables. If you need an intro, check here:
>
> http://www.furrypants.com/loope
>
> Irv
>
> At 8:56 AM -0400 6/28/01, Gene Fritzinger wrote:
> >Hello List,
> >
> >I'm creating a simulated version of a software package for use in a
> >CBT. There are many MIAWs and much information shared between
> >movies as global variables. I estimate that by the time I'm through
> >with project, there may be over one hundred global variables, some
> >of which will be saved to disk. I will also be copying a Cast to
> >user's hard drive to save selections and other field members. My
> >question is, is 100 (or so) global variables too many? Should I
> >consider another approach, such as saving information in a database
> >or field members off-stage? I have the V-12 DBE Xtra, but I'm not
> >sure my schedule will allow the time necessary for the learning
> >curve. Please consider sharing your thoughts and opinions on the
> >best way to handle this situation.
> >
> >Thanx in advance,
> >g fritzinger
> >
> >
> >[To remove yourself from this list, or to change to digest mode, go to
> >http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
> >email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
> >Lingo-L is for learning and helping with programming Lingo. Thanks!]
>
> --
>
> Lingo / Director / Shockwave development for all occasions.
>
> (Home-made Lingo cooked up fresh every day just for you.)
>
> [To remove yourself from this list, or to change to digest mode, go to
> http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
> email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
> Lingo-L is for learning and helping with programming Lingo. Thanks!]
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]