I'm trying to use a Numeric Stepper as a custom Item Renderer and Editor in
a DataGrid...  I keep getting a Stack Overflow error...

Please, someone tell me what the heck is wrong with this code?!  Because I
see nothing wrong with it...

The column from the DataGrid looks like this:
<mx:DataGridColumn headerText="Qty" dataField="user_sold" width="25"
editable="true" itemRenderer="com.ItemRenderers.QtyRenderer"
rendererIsEditor="true" editorDataField="value"/>

And the file QtyRenderer.mxml looks like this:
<?xml version="1.0" encoding="utf-8"?>
<mx:NumericStepper xmlns:mx="http://www.adobe.com/2006/mxml";
width="100%" minimum="1" stepSize="1">

     <mx:Script>
          <![CDATA[
               public override function set data(value:Object):void {
                    super.data = value;
                    if (data != null) {
                         this.maximum = data.sell_limit;
                    }
               }

          ]]>
     </mx:Script>

</mx:NumericStepper>


The 'data' being referenced is a value-object with many fields in it, two of
which are user_sold (the amount the user has purchased) and sell_limit (the
maximum amount the user may purchse).  Seems simple enough to set a damn
maximum on a Numeric Stepper -- but for some reason it just won't work with
the above example...  Can someone PLEASE tell me why?

Thanks,
Laurence MacNeill
Mableton, Georgia, USA

Reply via email to