Actually, we can create an mxml based TextInput, it works for me. Post your ActionSscript code at http://github.com/ or http://pastebin.com/ and we will work it out.
-- Best regards, Andriy Panas On 14 July 2010 18:34, bhaq1972 <mbha...@hotmail.com> wrote: > > > Thanks Andriy > > I just got round to testing it as a ActionScript class and it worked. > > I'm very surprised it we cant create an mxml based TextInput component. > > but there you go. > > thanks > bod > > > --- In flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>, Andriy > Panas <a.pa...@...> wrote: > > > > 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 <mbha...@...> 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> > > > > > > > > > > > > > >