2 Replies Latest reply on Dec 1, 2011 5:51 PM by drkstr_1

    Compiling Modified SDK ComboBox in a SWC not Working

    Gregory Lafrance Level 6

      I needed to overcome the SDK issue with the MX ComboBox not updating when the dataProvider is updated:

       

      https://bugs.adobe.com/jira/browse/SDK-27242

       

      A comment suggests overriding the ComboBox dataProvider setter:

       

      override public function set dataProvider(value:Object):void

      {

      // The dropdown will not be properly reset unless it is currently shown.

      open();

      super.dataProvider = value;

      }

       

      Because I don't want to override ComboBox, but rather recompile the MX one after modifying the dataProvider setter, I compile like this:

       

      compc -source-path="C:\Program Files\Adobe\Adobe Flash Builder 4.5\sdks\3.5.0\frameworks\projects\framework\src"  -include-classes=mx.controls.ComboBox -output=ComboBox.swc

       

      But when I add that SWC to my project, I get weird errors, like stuff referenced within the ComboBox are null.

       

      Is this the wrong approach? I'd rather not extend ComboBox, because then I have to make changes throughout the app to reference it, and just modifying/compiling the MX ComboBox seems much cleaner.