Hey Carlos, That's great. I'd written a very similar component a few years ago, which worked pretty much the same as yours except the code was never publication-worthy ;)
>From what I've seen, there are 2 minor differences: - there was a list of possible separators (which could also be configured); yours seems to have only one separator. I absolutely needed this because I created the component initially for a Belgian national register number which has a mask like this: ##.##.## - ###.## so both the dots and the dashes had to be separators. This would fix your 'sample phone mask' and 'sample IBAN mask' which are behaving a bit oddly as Harbs already mentioned. This is the list of default separators I used: /\|:-.()[]{}<> For the 'sample IBAN mask' the developer could then set separators="ES-" to override these defaults. - you could provide a custom mask like 'dd/mm/yyyy' for a date. I'm not sure, but it looks like your version supports only one mask character at a time. I also used this component to create a custom date input which combined the masked text input and the old mx date picker for better UX than mx DateField provides. I don't mind sharing my code, but as I already mentioned, it's a bit dirty :-/ cheers, Max On Mon, Dec 9, 2013 at 8:27 PM, Harbs <harbs.li...@gmail.com> wrote: > Very nice! > > One thing: > > The IBAN and Phone masks do not work the way I'd expect. It should jump > straight to the numbers. > > > On Dec 9, 2013, at 8:28 PM, Carlos Rovira wrote: > > > Hi, > > > > These days I worked a new spark MaskedTextInput component and I want to > > share a demo of this component so you can play with it. > > I think there's no such component already in the Flex SDK or out there, > and > > as I needed for a project I had to make one from scratch. > > The component is an extension of spark TextInput. > > > > I plan to commit this component to Apache Flex SDK in the next days > unless > > someone let me know another alternative or some info > > that make this component useless. In order to prepare the commit I want > to > > ask other committers and PMCs here where is the appropriate place > > to hold this component and share what you consider to take into account > in > > order to make a right integration. If someone thinks it's not worth it to > > make it part of the Flex SDK, let me know as well. I don't want to commit > > code that could not be right for the SDK. > > > > Here's the link to the demo. I posted as well some doc comment text to > > share the properties you can use: > > > > http://www.carlosrovira.com/blog/spark-maskedtextinput-demo/ > > > > Hope you consider it interesting and if you know some other similar > > component out there, please let me know! :) > > > > Best, > > > > > > -- > > -- > > Carlos Rovira > >