Unsubscribe Remove

On Oct 20, 2007, at 5:21 AM, Michael Ypes wrote:

Great to have the list back, I was worried for a while that it was gone
forever, phewwwww

In answer to your question:

Create a singleton class which stores all data. I use this in applications to store data from xml files and use it as a mvc pattern. This way you can extract the information from the data anywhere in the application by using
the getInstance() method.

EG.

ModelData.getInstance().getMenuColor()

Which would then return the color that you are after.

Read Joey Lotts book AS3 with Design Patterns - which can be easily
translated for AS2 but really helps on building a usable architecture for
your applications which are scaleable and usable.

If you require an example then shout again. Bit rushed at the mo.

Cheers

M

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tom Huynen
Sent: 19 October 2007 10:41
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] central up to date data

Hi List!

I'm using a class named utils.as to store data like color values in my
project.
This class is then extended by let's say the application.as and the menu.as.

Next in the application class I change the value of a var in the utils
class.
When retrieving this value from the third (menu) class I still get the old
value instead of the new one.

What is the best thing to do when I want to keep my data central, up to date
and accesible for all classes in my project?

Kind regards,

Tom
_______________________________________________
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