NSScriptingComparisonMethods

NSScriptingComparisonMethods Mac OS X 10.0

This informal protocol declares methods that are appropriate for use in comparing scriptable objects. Many Cocoa classes provide default implementations of these methods as part of the built-in support for scripting. This is especially true for the Foundation classes such as NSString, NSNumber, and NSDate that represent basic data types in a scripting environment. When a specifier test object evaluates a Boolean expression, it tries to invoke methods of this protocol in the relevant objects. If neither of the objects implement the necessary methods, then the scripting system will try to invoke methods from the NSComparisonMethods protocol.

@interface NSObject (NSScriptingComparisonMethods)
 // Instance Methods
   - (BOOL)scriptingIsEqualTo:(id)object;
   - (BOOL)scriptingIsLessThanOrEqualTo:(id)object;
   - (BOOL)scriptingIsLessThan:(id)object;
   - (BOOL)scriptingIsGreaterThanOrEqualTo:(id)object;
   - (BOOL)scriptingIsGreaterThan:(id)object;
   - (BOOL)scriptingBeginsWith:(id)object;
   - (BOOL)scriptingEndsWith:(id)object;
   - (BOOL)scriptingContains:(id)object;
@end



    Part II: API Quick Reference
    Chapter 13. Foundation Classes