Well, here's the actual error:

Error: Error #1023: Stack overflow occurred.
 at flash.events::Event()
 at
mx.events::FlexEvent()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\events\FlexEvent.as:1181]
 at mx.controls::NumericStepper/set
data()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\controls\NumericStepper.as:629]
 at com.ItemRenderers::QtyRenderer/set data()[C:\Documents and
Settings\LMacNeill\Flash Builder
4\QMS\src\com\ItemRenderers\QtyRenderer.mxml:9]
 at mx.controls::NumericStepper/get
data()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\controls\NumericStepper.as:611]
 at com.ItemRenderers::QtyRenderer/set data()[C:\Documents and
Settings\LMacNeill\Flash Builder
4\QMS\src\com\ItemRenderers\QtyRenderer.mxml:10]
 at mx.controls::NumericStepper/get
data()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\controls\NumericStepper.as:611]
 at com.ItemRenderers::QtyRenderer/set data()[C:\Documents and
Settings\LMacNeill\Flash Builder
4\QMS\src\com\ItemRenderers\QtyRenderer.mxml:10]
 (repeats the last two "at blah blah blah..." lines about 50 times)

If I reference 'data' anywhere in the set data function, I get the error.
If I don't reference it, I don't get the error...  But then I can't set the
maximum for the Numeric Stepper...

I'm thinking there might be a bug in Numeric Stepper, to be honest -- none
of my other custom item renderers do this, and they're all structured
EXACTLY the same way...

L.

On Sun, Sep 12, 2010 at 10:30 PM, Marty Blood <[email protected]> wrote:

> 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