title: Properties null at component drawing time?
body: <p>I have got problem accessing a property of a component. I want to use this property to decide whether to include a particular child component.</p>
  
  <p>For example:
  <strong><em>MyMainView.mxml</em></strong> lists this component</p>
  
  <pre><code>&lt;view:AnotherView id="anotherView" aPresenter="{thePresenter}"/&gt;
  </code></pre>
  
  <p>Now <strong><em>AnotherView.mxml</em></strong> has a property</p>
  
  <pre><code>&lt;fx:Script&gt;&lt;![CDATA[
      [Bindable]
      public var aPresenter:APresenter;
  ]]&gt;&lt;/fx:Script&gt;
  </code></pre>
  
  <p>and then in this <strong><em>AnotherView.mxml</em></strong> when I am adding something e.g.</p>
  
  <pre><code>&lt;s:Spacer height="10" includeInLayout="{aPresenter.id != -1}"/&gt;
  </code></pre>
  
  <p><em>aPresenter</em> is still null hence the spacer get drawn no matter what. On the other hand if I use <em>aPresenter</em> for a dataProvider it works</p>
  
  <pre><code>&lt;mx:Repeater id="addressDetailsRepeaterView" dataProvider="{presenter.arrayOfFields}"&gt;
  &lt;/mx:Repeater&gt;
  </code></pre>
  
  <p>Can somebody please help me understand the flow of events on creation of a flex component and how I can use the <em>aPresenter</em> property in .</p>
  
  <p>Thanks</p>