Initializer for ‘defaultButton’: values of type mx.core.IFlexDisplayObject cannot be represented in text

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

Initializer for ‘defaultButton’: values of type mx.core.IFlexDisplayObject cannot be represented in text

5 thoughts on “Initializer for ‘defaultButton’: values of type mx.core.IFlexDisplayObject cannot be represented in text

  1. 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”>

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s