[flexcoders] Re: Training from the Source - Can't find my error
Try this: ... ... This gives the outerDocument method the visibility to the ShoppingCartItem component from within the VBox.
[flexcoders] Re: Training from the Source - Can't find my error
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" 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: > > > > > id="cartView" > > dataProvider="{cart.aItems}" width="100%" height="100%" > > editable="true" draggableColumns="false" > > variableRowHeight="true"> > > > > > headerText="Product" > > itemRenderer="renderer.ecomm.ProductName" > > editable="false"/> > > > itemEditor="mx.controls.NumericStepper" > > editorDataField="value" editable="true" > > headerText="Quantity" /> > > > headerText="Amount" > > labelFunction="renderPriceLabel" editable="false" /> > > > > > > > > > > > label="Remove" > > > click="outerDocument.removeItem(valueObjects.ShoppingCartItem(data));"/> > > > > > > > > > > > > > > > > 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] Re: Training from the Source - Can't find my error
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" <[EMAIL PROTECTED]> 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: > > id="cartView" > dataProvider="{cart.aItems}" width="100%" height="100%" > editable="true" draggableColumns="false" > variableRowHeight="true"> > >headerText="Product" > itemRenderer="renderer.ecomm.ProductName" > editable="false"/> > itemEditor="mx.controls.NumericStepper" > editorDataField="value" editable="true" > headerText="Quantity" /> >headerText="Amount" > labelFunction="renderPriceLabel" editable="false" /> > > > > > label="Remove" > click="outerDocument.removeItem(valueObjects.ShoppingCartItem(data));"/> > > > > > > > > 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/