Date coercion fails? Chapter 13, 'Checkout'

2 views
Skip to first unread message

gimmeanamehere

unread,
Nov 4, 2009, 6:42:13 PM11/4/09
to Flex 3:Training from the Source
Hi,
I'm at the end of Chapter 13. When I add items to the cart, go to
checkout, fill out the user info and use the selected date (or select
a new date) and press the Checkout button I get the following error:

TypeError: Error #1034: Type Coercion failed: cannot convert
"{deliveryDate.selectedDate" to Date.
at views.ecomm::Checkout/doBillingInfoReturn()[C:\FlexBuilderWorkspace
\Lesson13\src\views\ecomm\Checkout.mxml:20]
at views.ecomm::Checkout/__billingInfo_billingInfoReturn()[C:
\FlexBuilderWorkspace\Lesson13\src\views\ecomm\Checkout.mxml:39]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.2.0\frameworks
\projects\framework\src\mx\core\UIComponent.as:9298]
at views.ecomm::BillingInfo/process()[C:\FlexBuilderWorkspace
\Lesson13\src\views\ecomm\BillingInfo.mxml:14]
at views.ecomm::BillingInfo/___BillingInfo_Button1_click()[C:
\FlexBuilderWorkspace\Lesson13\src\views\ecomm\BillingInfo.mxml:64]

I've copied the 'complete' files into the working project and this
doesn't help.

Any ideas?

Michael Labriola

unread,
Nov 4, 2009, 11:22:50 PM11/4/09
to Flex 3:Training from the Source
I think you must have missed something when you copied the completed
files as mine have an extra } before the quote.

The error message is telling you that it cannot convert the string
"{deliveryDate.selectedDate" to a Date. Since you are missing the last
squiggly bracket, flex is assuming you mean that string, not the value
of the selectedDate property of the deliveryDate.

gimmeanamehere

unread,
Nov 5, 2009, 10:38:23 AM11/5/09
to Flex 3:Training from the Source
Got it thanks!
Reply all
Reply to author
Forward
0 new messages