1 Reply Latest reply on Oct 20, 2010 7:54 AM by Gurdeep Singh

    strange: can't access public var in model in Cairngorm

    madhooper Level 1

      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 {}