HHValidatedButton: User interface validation for NSButton
August 23, 2009 12:21 PM
| Cocoa, Development, Houdah, Mac
| Permalink
According to the Cocoa User Interface Validation documentation: "The protocols NSUserInterfaceValidations and NSValidatedUserInterfaceItem provide a standard way to validate user interface items—that is, to set their state as appropriate for the current application context".
Unfortunately, automatic user intreface validation is provided only for menu items and toolbar items. Wouldn't it be great if NSButton could also benefit from this set-up?
That's what HHValidatedButton implements. It is a drop-in subclass of NSButton. It channels validation through validateButton: and validateUserInterfaceItem:.
Unfortunately, automatic user intreface validation is provided only for menu items and toolbar items. Wouldn't it be great if NSButton could also benefit from this set-up?
That's what HHValidatedButton implements. It is a drop-in subclass of NSButton. It channels validation through validateButton: and validateUserInterfaceItem:.
Comments (2)