Easy Core Data validationUsually, when writing Core Data validation methods, you need to add a lot of boilerplate code to handle error chaining. Not only is error chaining easy to make wrong, it also clutters your precious business logic with Core Data code, making validation methods more difficult to maintain and reuse. Most notably, such validation methods cannot be reused for simple needs like validation of values entered interactively. Core Data validations are namely meant to be triggered by Core Data in a row once an object is saved to the store. It is often not what you want.
CoconutKit 1.1 therefore introduces a new way to write validation methods, without the need to care about the usual Core Data boilerplate code. Your methods now can focus on business logic only, and can be easily called to validate fields individually when needed.
But there is more. If you often write forms for editing Core Data objects (most notably made of text fields), you probably always end up writing the same kind of code:
These days are over. You now simply bind a text field to a model object field (providing an optional NSFormatter if needed), all the rest is handled for you. Your code will be faster and easier to write, understand, and maintain.
I put a lot of effort to get this feature right, testing it extensively and ensuring it is really easy to use. I sincerely hope it will help you write better Core Data validation code.
Localization in nib filesWhen I identify a tedious task I perform every day, I usually try to find a way to make it as simple as possible. One such task is the creation and binding of label and button outlets just for localization purposes. Of course, tools like Accessorizer make this process less painful, but they do not eliminate all the corresponding code which clutters your view controller interface and implementation files. Wouldn't it be nice if we could directly localize strings in nib files without having to create outlets?
Well, with CoconutKit 1.1 you can. Add a label or a button in Interface Builder, set its text to "LS/" followed by the localization key, and you are done. This feature also integrates with CoconutKit dynamic localization feature, which means all those labels get properly updated when the localization is changed at runtime.
To help you when you localize your nib files this way, I added a debugging feature which highlights all labels and buttons for which a localization is missing. There is currently no way to extract localization keys automatically from nib files (like genstrings does for source files), but I should provide you with a dedicated tool in a near future.