0 Replies Latest reply on Jul 30, 2007 6:16 AM by bortot

    ItemEditor with popup

    bortot
      please consider the following drop-in item editor used inside a DataGrid:

      package components.conf.grid
      {
      import mx.containers.HBox;
      import mx.controls.TextInput;
      import mx.controls.PopUpButton;
      import mx.controls.NumericStepper;

      public class BogusEditor extends HBox
      {
      public function BogusEditor()
      {
      super();

      var text:TextInput = new TextInput;
      text.percentWidth = 100;
      var button:PopUpButton = new PopUpButton;
      button.popUp = new NumericStepper;

      this.addChild(text);
      this.addChild(button);
      }
      }
      }

      It is the simplest case I could get to show the problem I have: when you pop up the numeric stepper and interact with it, the grid cell being edited exits from editing status while leaving the popup still open (and zombie...).
      Note that, if you use ie a DateChooser instead of the NumericStepper, everything works just fine.
      Of course, the previous code is just for example, as it the popup is obviously useless without a commit mechanism.