6 Replies Latest reply on Aug 8, 2009 2:48 PM by PeakDigital

    "Best practice" for accessing a class from a custom component?

    PeakDigital

      My app utilizes a simple class to hold global properties such as username, session data, and similar data. The class is initialized at app startup via code similar to: appGlobals:myGlobals=new myGlobals.

       

      Many of the custom MXML components and AS classes need to access that data. I have been able to work with it using Application.application.appGlobals.propertyname.

       

      Is this method the best way to communicate from components and classes to a class initiated at the application level, or should I learn something new before I build a lot of code on this method?

       

      Thanks.

      Paul