While working on couple of bugs, it started to seem that our design of TextField.setFormat(…) is confusing. In my opinion that API should be marked as deprecated 5.3.0 (before the end of beta). Better solution is proposed on http://dev.itmill.com/ticket/2078
Thoughts: applying formatting while using a FieldFactory will be made (much) less intuitive this way. Same goes for the basic, no datasource, I-have-this-textfield-that-I-want-to-format.
At the very least we need some good examples and use-cases.
(note: while the deprecated method will still work, we can not expect new users to use it)
The against vote is mine. I don’t know about the technical superiority of the proposed solution, my problem is that it hides the feature from the user quite well.
User: “Let’s see, I want to have a formatting for my TextField. I wonder if there is a method for that, such as a ‘setFormat()’ or something… Nope, damn.”
It’s not so intuitive that you can do formatting with a special data source. Mentioning it in documentation doesn’t help if you don’t know it’s there.