Re: [flexcoders] Re: Compile error when trying to use an extended spark TextInput
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 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 , Andriy > Panas wrote: > > > > I cannot reproduce your issue in a normal case. > > > > I can reproduce your issue only in extreme case, e.g. > > > > > > textValue2 > > > > > > > > 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 wrote: > > > > > > > > > > > I have created a very simple MyTextInput > > > > > > MyTextInput.mxml > > > - > > > > > > http://ns.adobe.com/mxml/2009"; > > > xmlns:s="library://ns.adobe.com/flex/spark" > > > xmlns:mx="library://ns.adobe.com/flex/mx"> > > > > > > !-- Place non-visual elements (e.g., services, value objects) here --> > > > > > > > > > > > > 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 > > > --- > > > http://ns.adobe.com/mxml/2009"; > > > xmlns:s="library://ns.adobe.com/flex/spark" > > > xmlns:mx="library://ns.adobe.com/flex/mx" > > > xmlns="*"> > > > > > > > > > > > > > > > > > > > > > > >
[flexcoders] Re: Compile error when trying to use an extended spark TextInput
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, Andriy Panas wrote: > > I cannot reproduce your issue in a normal case. > > I can reproduce your issue only in extreme case, e.g. > > > textValue2 > > > > 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 wrote: > > > > > > > I have created a very simple MyTextInput > > > > MyTextInput.mxml > > - > > > > http://ns.adobe.com/mxml/2009"; > > xmlns:s="library://ns.adobe.com/flex/spark" > > xmlns:mx="library://ns.adobe.com/flex/mx"> > > > > !-- Place non-visual elements (e.g., services, value objects) here --> > > > > > > > > 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 > > --- > > http://ns.adobe.com/mxml/2009"; > > xmlns:s="library://ns.adobe.com/flex/spark" > > xmlns:mx="library://ns.adobe.com/flex/mx" > > xmlns="*"> > > > > > > > > > > > > >
[flexcoders] Re: Compile error when trying to use an extended spark TextInput
fyi. I'm using FlashBuilder (with Flex 4.1 upgrade). This was a very basic test just to highlight the problem. My actual extended TextInput has alot more code (it also has a child button which i use to open up a number of popup components) I'll try out your Actionscript component suggestion. Thanks (btw this component is in mxml because thats how I did it back in Flex 1) --- In flexcoders@yahoogroups.com, Andriy Panas wrote: > > I cannot reproduce your issue in a normal case. > > I can reproduce your issue only in extreme case, e.g. > > > textValue2 > > > > 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 wrote: > > > > > > > I have created a very simple MyTextInput > > > > MyTextInput.mxml > > - > > > > http://ns.adobe.com/mxml/2009"; > > xmlns:s="library://ns.adobe.com/flex/spark" > > xmlns:mx="library://ns.adobe.com/flex/mx"> > > > > !-- Place non-visual elements (e.g., services, value objects) here --> > > > > > > > > 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 > > --- > > http://ns.adobe.com/mxml/2009"; > > xmlns:s="library://ns.adobe.com/flex/spark" > > xmlns:mx="library://ns.adobe.com/flex/mx" > > xmlns="*"> > > > > > > > > > > > > >