3 Replies Latest reply on Nov 5, 2007 9:52 AM by ntsiii

    CreationPolicy not enough!

    Mxmler
      Hi all,

      In my project, I have the following situation:

      - Main mxml file contains a component called entryWrapper
      - Inside Wrapper, it has also another component called extraView

      Main class will be responsible for managing all RemoteObject services calls. Once the user login into the system, I will
      need to prepare comboBox data provider located in Extra component before I can move the user into that particular state.

      I have tried to change the creation policy attribute for the Wrapper and Extra to be "all". But nothing has changed.
      The error message I got it: Cannot access a property or method of a null object reference.

      The following code sequence in the Main class:
      this.entryWrapper.extraView.projectComboBox.dataProvider = projectNameArray;
      this.currentState = CurrentState.PREPARATION;

      But one I changed the sequence to be like this:
      this.currentState = CurrentState.PREPARATION;
      this.entryWrapper.extraView.projectComboBox.dataProvider = projectNameArray;

      It works! I know logically its wrong. Any idea to solve this problem?