Copy link to clipboard
Copied
I can access the public const but not the pubic var in my model. Can someone tell me what's the problem? Thanks in advance.
package model
{
import com.adobe.cairngorm.model.IModelLocator;
[Bindable]
public class ModelLocator implements IModelLocator {
// Single Instance of Our ModelLocator
private static var instance:ModelLocator;
public function ModelLocator(enforcer:SingletonEnforcer) {
if (enforcer == null) {
throw new Error( "Hey, You Can Only Have One ModelLocator" );
}
}
// Returns the Single Instance
public static function getInstance() : ModelLocator {
if (instance == null) {
instance = new ModelLocator( new SingletonEnforcer );
}
return instance;
}
//MY VARIABLES HERE
public var workflowState:uint = 0;
public var gotit:String = "Dameon";
//MY CONSTANTS
public static const SEARCH_SCREEN = 0;
public static const DIAGRAM_SCREEN =1;
}
}
// Utility Class to Deny Access to Constructor
class SingletonEnforcer {}
Copy link to clipboard
Copied
This appears to be a Flex question. Please try the flex forums here http://forums.adobe.com/community/flex/flex_general_discussion