BLIP/BLIPDispatcher.h
changeset 13 84c2d38f924c
parent 2 9fdd8dba529c
child 26 cb9cdf247239
     1.1 --- a/BLIP/BLIPDispatcher.h	Sat May 24 17:25:06 2008 -0700
     1.2 +++ b/BLIP/BLIPDispatcher.h	Wed Jun 04 17:11:20 2008 -0700
     1.3 @@ -10,8 +10,9 @@
     1.4  @class MYTarget, BLIPMessage;
     1.5  
     1.6  
     1.7 -/** Routes BLIP messages to targets based on a series of rule predicates.
     1.8 -    Every BLIPConnection has a BLIPDispatcher, which is initially empty but you can add rules
     1.9 +/** Routes BLIP messages to targets based on a series of rules.
    1.10 + 
    1.11 +    Every BLIPConnection has a BLIPDispatcher, which is initially empty, but you can add rules
    1.12      to it.
    1.13   
    1.14      Every BLIPListener also has a dispatcher, which is inherited as the parent by every
    1.15 @@ -33,11 +34,13 @@
    1.16      the parent, if there is one. */
    1.17  @property (retain) BLIPDispatcher *parent;
    1.18  
    1.19 +/** Convenience method that adds a rule that compares a property against a string. */
    1.20 +- (void) addTarget: (MYTarget*)target forValueOfProperty: (NSString*)value forKey: (NSString*)key;
    1.21 +
    1.22 +#if ! TARGET_OS_IPHONE      /* NSPredicate is not available on iPhone, unfortunately */
    1.23  /** Adds a new rule, to call a given target method if a given predicate matches the message. */
    1.24  - (void) addTarget: (MYTarget*)target forPredicate: (NSPredicate*)predicate;
    1.25 -
    1.26 -/** Convenience method that adds a rule that compares a property against a string. */
    1.27 -- (void) addTarget: (MYTarget*)target forValueOfProperty: (NSString*)value forKey: (NSString*)key;
    1.28 +#endif
    1.29  
    1.30  /** Removes all rules with the given target method. */
    1.31  - (void) removeTarget: (MYTarget*)target;