1 Reply Latest reply on Oct 5, 2007 6:33 AM by DEfusion

    Binding oddity/error in custom component

    DEfusion
      I have the following.

      Main application:

      <mx:Text text="{test}" />
      <custom:Tester />
      <mx:Script>
      [Bindable]
      public var test:String = 'TEST';
      </mxScript>

      Custom Tester component:


      Main application:

      <mx:Text text="{testInside}" />
      <mx:Script>
      [Bindable]
      public var testInside:String = 'TEST TWO';
      </mxScript>

      Whenever I run this with the binding inside my custom component I get a Error #1009: Cannot access a property or method of a null object reference. It should work, there's nothing else in the application anymore and yet I'm still getting the error, as soon as I change the text inside the custom component to not use the binding then it all works fine.

      I'm using Flex Builder 3, but with the 2.0.1 SDK, but surely that can't make a difference.

      Any advice would be greatly appreciated as this is driving me crazy.