Hi,
I have a class called LogoutCommand.as, code snippet below:
public class LogoutCommand implements ICommand {
public var modelLocator:ViewModelLocator = ViewModelLocator. The above code works fine, but when the screen changes back to the login screen, the username and password fields are still filled in with the users' original entries.getInstance( );
public function LogoutCommand() {
}
public function execute(event:CairngormEvent) :void {
modelLocator.workflowState = ViewModelLocator. LOGIN_SCREEN;
modelLocator.loginBoxMessage = "You have been logged out!";
}
}
On logout, I would like those fields to be cleared. I am unsure on how I would access the fields from my Command Class. The syntax should be simple, I think I am struggling with "accessibility" and knowing how to interact with an object in a different file or whatever...
On my "LoginScreen.mxml" file I have this control: <mx:TextInput id="username" width="180"/> I should be able to set its text or value property to empty string or something, just not sure how to do that from the Command Class if that makes sense.
Any help appreciated...
-