Micahel,

I had the same problem but trying your suggestion with the space
before the keyword valueObjects does not work for me.  I have moved on
by deleting the click event but am curious as to what is causing the
compiler anomoly.  Is there current defect list for Flex that I can
reference?

Oscar

--- In flexcoders@yahoogroups.com, "Michael Labriola" <[EMAIL PROTECTED]>
wrote:
>
> 
> Glad you are enjoying it.
> 
> We have occasionally seen the same thing. The flex compiler seems to
> get confused with the inline renderer and the valueObject.
> 
> This line is the cause:
> 
> outerDocument.removeItem(valueObjects.ShoppingCartItem(data));
> 
> You can literally go an modify this line by adding a space before the
> word valueObject. Then remove the space and all will work next time
> your compile. 
> 
> It doesn't happen everytime on every computer. If it becomes
> problematic, just remove the entire click event from the delete in the
> shopping cart. My guess is that by this point in the book, you
> understand how that is supposed to work.
> 
> --Mike
> 
> --- In flexcoders@yahoogroups.com, "Todd Breiholz" <talanb@> wrote:
> >
> > 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
> >
>


Reply via email to