I'd check for bindings that might be getting caught in a loop.  The stack
trace from the error when it throws the Stack Overflow should show that
though if you're caught in a binding loop.  In particular, do you have
anything bound to the maximum field for the component?  Good luck!

-Marty

On Sun, Sep 12, 2010 at 9:54 PM, Laurence MacNeill
<[email protected]>wrote:

> 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