Ah! so that's like a global variable(s) then. That's perfect and fits 100%. Thanks SO much! Scott
________________________________ From: flexcoders@yahoogroups.com on behalf of Tracy Spratt Sent: Tue 7/15/2008 12:18 PM To: flexcoders@yahoogroups.com Subject: {Disarmed} RE: [flexcoders] Accessing information in a class Store info you need to persist in a data model class instead of worrying about persisting UI classes. Tracy ________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Scott Sent: Tuesday, July 15, 2008 10:53 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Accessing information in a class I've been playing around with this a few days now and I think I understand that just because I make a call to a class, it doesn't necessarily mean that it goes out to the remote object unless I send() or call(). (I guess it would be similar to posting information in HTML/CFML so that makes sense). I'm not sure if I'm structuring this program right as I go down this path so I just wanted to bounce the structure off all of you. Main.mxml has several classes attached to it. Each class (.mxml file) is a different component on the website. For instance I have a login class that displays either a login button, login name/password, or a "you are logged in as ..." screen depending on the state of that object. I've got other components that I'm working on as well that are similar in nature. This is all pretty simple/easy... Now for the somewhat questionable piece... I'm not sure if the classes are persistent. When they are created, do they stay active and keep the data in them? For instance, I want to provide tools to people that have different levels of security. If they have the "admin" role then it might show an edit tab on one of the objects on the screen, etc... So in other words, I need to check the login class to see if they have admin as a role. (or is there a better way?) When I use the login class to log the user in, I pull a list of roles back so it's in the class at that point in time. However, when I'm watching the debugger it looks like that variable scope dissapears when it leaves the class. If I create a link in two different classes to the same class (say login), are they accessing the same class or are they each accessing their own copy of the class? TIA Scott -- This message has been scanned for viruses and dangerous content by MailScanner <http://www.mailscanner.info/> , and is believed to be clean.
<<winmail.dat>>