I cannot reproduce your issue in a normal case.
I can reproduce your issue only in extreme case, e.g.
<local:MyTextInput text="textValue1">
<fx:String>textValue2</fx:String>
</local:MyTextInput>
BTW, why extend from TextInput class in MXML?
If there are no visual subchildren in your custom component, it's better to
extend the class in solemn ActionScript.
--
Best regards,
Andriy Panas
On 14 July 2010 13:41, bhaq1972 <[email protected]> wrote:
>
>
> I have created a very simple MyTextInput
>
> MyTextInput.mxml
> -----------------
> <?xml version="1.0" encoding="utf-8"?>
> <s:TextInput xmlns:fx="http://ns.adobe.com/mxml/2009"
> xmlns:s="library://ns.adobe.com/flex/spark"
> xmlns:mx="library://ns.adobe.com/flex/mx">
> <fx:Declarations>
> !-- Place non-visual elements (e.g., services, value objects) here -->
> </fx:Declarations>
> </s:TextInput>
>
> When I try using it in a Application I am getting the compile error -
>
> Multiple initializer values for default property, 'text', of type 'String'
>
> What am I missing?
> thanks
>
> testApp
> -------
> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
> xmlns:s="library://ns.adobe.com/flex/spark"
> xmlns:mx="library://ns.adobe.com/flex/mx"
> xmlns="*">
>
> <MyTextInput/>
> </s:Application>
>
>
>