Error:
Initializer for ‘defaultButton’: values of type mx.core.IFlexDisplayObject cannot be represented in text.
The property defaultButton of the Form element was expecting something other than a string. Here is the original source code:
And the correct source code:
Notice the curly brackets get the actual object as it would if it were inside ActionScript (that is because it actually is -ed.).
Please reply in the comments below if this helped you or not
Hi, I have the same problem. Could you please show the code somewhere? Regards, masu
My bad. I had not enclosed the code in code tags. You should be able to see it now.
Thanks! I’ve been scratching my head so bad for this problem. Still getting the hang of MXML, sometimes is hard to get. :)
I got the same error when I wrongly closed XML tag in MXML too soon:
Wrong code:
—————-
<presentation:CompanyUnits id=”companyUnits”>
width=”200″
height=”100%”
title=”Company units”
Correct code:
—————-
<presentation:CompanyUnits id=”companyUnits”
width=”200″
height=”100%”
title=”Company units”>
Thanks man!