That is a really good solution.  I think that the reason we do that is
because we are learning how to use object oriented programming techniques
and trying to synthesize various cloudy and sometimes contradictory
recommendations.

M

On 1/31/06, Steven Sacks <[EMAIL PROTECTED]> wrote:
>
> Making a class for globals is lame.  I don't get why people do stuff like
> that.  It's completely unnecessary.  Here's how I make a namespace for
> globals in one line.
>
> On frame one of the root timeline:
>
> _global.APP = {};
>
> Wow. That was so hard.
>
> APP.someglobal
> APP.someotherglobal
> APP.etc
>
>
>
> > Nathan Derksen nderksen at sfu.ca wrote:
> > >I generally keep at least one singleton class which is responsible
> > >for storing global properties. I make those properties accessible
> > >with getters and setters so that I can allow changes in those
> > >properties to trigger events. You can't really do that if you use
> > >_global to store your data. Also, there is always a risk in name
> > >space collision if you load in other elements that also use global,
> > >where one or more variables use the same name and are thus
> > >inadvertently shared for different uses. You definitely do not want
> > >to use _global within any classes that you create, as that
> > can cause
> > >entanglement, gives you no private protection, and does not
> > properly
> > >contain your code into a well-defined unit with a well-defined API.
> > >
> > >Nathan
> > >http://www.nathanderksen.com
> >
> > _______________________________________________
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to