File:  [NeXTSTEP 3.3 examples] / Examples / EnterpriseObjects / Validation / Validation.subproj / KeyValueValidation.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:48:57 2018 UTC (8 years, 1 month ago) by root
Branches: NeXT, MAIN
CVS tags: NeXTSTEP33, HEAD
Sample Programs from NeXSTEP 3.3

// KeyValueValidation
// An informal protocol for validating changes to EOs before setting the
// changes takeValuesFromDictionary
#import <eoaccess/eoaccess.h>

@interface NSObject (KeyValueValidation)
- (NSDictionary *)validateValuesInDictionary:(NSDictionary *)values;
    // should return a set of key / error message pairs or nil if
    // all the values are acceptable.
    // The default implementation looks for methods with the signature
    // (NSString *)validate<KeyName>:value, which should return nil on
    // success or user presentable error message on error.
@end

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.