Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added MKContextual mixInto

  • Loading branch information...
commit 971001e03d9c56be16983b200736a583f731555e 1 parent 59123bd
@cneuwirt authored
Showing with 10 additions and 2 deletions.
  1. +3 −0  Miruken/Context/MKContextual.h
  2. +7 −2 Miruken/Context/MKContextual.m
View
3  Miruken/Context/MKContextual.h
@@ -36,6 +36,9 @@
*/
@interface MKContextualMixin : NSObject
+
++ (void)mixInto:(Class)class;
+
@end
/**
View
9 Miruken/Context/MKContextual.m
@@ -20,6 +20,11 @@ @interface MKContextualMixin () <MKContextual>
@implementation MKContextualMixin
++ (void)mixInto:(Class)class
+{
+ [class mixinFrom:self];
+}
+
- (MKContext *)context
{
return objc_getAssociatedObject(self, @selector(context));
@@ -147,8 +152,8 @@ + (id)bindContext:(MKContext *)context toObject:(id)object
@throw [NSException
exceptionWithName:@"ContextNotAccepted"
- reason:@"The object does not accept a Context. "
- "Did you forget to conform to the Contextual protocol?"
+ reason:@"The object does not accept an MKContext. "
+ "Did you forget to conform to the MKContextual protocol?"
userInfo:nil];
}
Please sign in to comment.
Something went wrong with that request. Please try again.