I am working through the Adobe Flex 2 - Training from the Source book.
(Excellent book, BTW). I am in chapter 11 on the section "Create an
inline MXML Item Renderer for Displaying the Remove Button". I can't
get beyond this section, because my code won't compile with the
following error:

1120: Access of undefined property
valueObjects.   FlexGrocer/views/ecomm  Cart.mxml       
/FlexGrocer/views/ecomm/Cart.mxml       1162264545587   243

Here's my data grid:

        <mx:DataGrid
                id="cartView"
                dataProvider="{cart.aItems}" width="100%" height="100%"
                editable="true" draggableColumns="false"
                variableRowHeight="true">
                <mx:columns>
                        <mx:DataGridColumn dataField="product" 
headerText="Product"
                                itemRenderer="renderer.ecomm.ProductName" 
editable="false"/>
                        <mx:DataGridColumn dataField="quantity"
                                itemEditor="mx.controls.NumericStepper"
                                editorDataField="value" editable="true" 
headerText="Quantity" />
                        <mx:DataGridColumn dataField="subtotal" 
headerText="Amount"
labelFunction="renderPriceLabel" editable="false" />
                        <mx:DataGridColumn editable="false">
                                <mx:itemRenderer>
                                        <mx:Component>
                                                <mx:VBox>
                                                        <mx:Button
                                                                label="Remove"
                                                                
click="outerDocument.removeItem(valueObjects.ShoppingCartItem(data));"/>
                                                </mx:VBox>
                                        </mx:Component>
                                </mx:itemRenderer>
                        </mx:DataGridColumn>
                </mx:columns>
        </mx:DataGrid>

It's choking on the click event of the inner Button component.

I've even copied the code from the CD into my project but I get the same error.

Anyone see what I'm doing wrong?

Thanks!

Todd


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to