Changeset 4873
- Timestamp:
- 08/22/07 21:17:13 (1 year ago)
- Files:
-
- WiredAdditions/trunk/NSNotificationCenter-WIAdditions.h (modified) (1 diff)
- WiredAdditions/trunk/NSNotificationCenter-WIAdditions.m (modified) (3 diffs)
- WiredAdditions/trunk/NSObject-WIAdditions.h (modified) (1 diff)
- WiredAdditions/trunk/NSObject-WIAdditions.m (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
WiredAdditions/trunk/NSNotificationCenter-WIAdditions.h
r4438 r4873 34 34 35 35 - (void)mainThreadPostNotificationName:(NSString *)name; 36 - (void)mainThreadPostNotificationName:(NSString *)name waitUntilDone:(BOOL)waitUntilDone; 36 37 - (void)mainThreadPostNotificationName:(NSString *)name object:(id)object; 38 - (void)mainThreadPostNotificationName:(NSString *)name object:(id)object waitUntilDone:(BOOL)waitUntilDone; 37 39 - (void)mainThreadPostNotificationName:(NSString *)name object:(id)object userInfo:(NSDictionary *)userInfo; 40 - (void)mainThreadPostNotificationName:(NSString *)name object:(id)object userInfo:(NSDictionary *)userInfo waitUntilDone:(BOOL)waitUntilDone; 38 41 39 42 @end WiredAdditions/trunk/NSNotificationCenter-WIAdditions.m
r4438 r4873 45 45 46 46 - (void)mainThreadPostNotificationName:(NSString *)name { 47 [self mainThreadPostNotificationName:name waitUntilDone:NO]; 48 } 49 50 51 52 - (void)mainThreadPostNotificationName:(NSString *)name waitUntilDone:(BOOL)waitUntilDone { 47 53 [self performSelectorOnMainThread:@selector(postNotificationName:object:) 48 54 withObject:name 49 withObject:NULL]; 55 withObject:NULL 56 waitUntilDone:waitUntilDone]; 50 57 } 51 58 … … 53 60 54 61 - (void)mainThreadPostNotificationName:(NSString *)name object:(id)object { 62 [self mainThreadPostNotificationName:name object:object waitUntilDone:NO]; 63 } 64 65 66 67 - (void)mainThreadPostNotificationName:(NSString *)name object:(id)object waitUntilDone:(BOOL)waitUntilDone { 55 68 [self performSelectorOnMainThread:@selector(postNotificationName:object:) 56 69 withObject:name 57 withObject:object]; 70 withObject:object 71 waitUntilDone:waitUntilDone]; 58 72 } 59 73 … … 61 75 62 76 - (void)mainThreadPostNotificationName:(NSString *)name object:(id)object userInfo:(NSDictionary *)userInfo { 77 [self mainThreadPostNotificationName:name object:object userInfo:userInfo waitUntilDone:NO]; 78 } 79 80 81 82 - (void)mainThreadPostNotificationName:(NSString *)name object:(id)object userInfo:(NSDictionary *)userInfo waitUntilDone:(BOOL)waitUntilDone { 63 83 [self performSelectorOnMainThread:@selector(postNotificationName:object:userInfo:) 64 84 withObject:name 65 85 withObject:object 66 withObject:userInfo]; 86 withObject:userInfo 87 waitUntilDone:waitUntilDone]; 67 88 } 68 89 WiredAdditions/trunk/NSObject-WIAdditions.h
r4827 r4873 57 57 58 58 - (void)performSelectorOnMainThread:(SEL)selector; 59 - (void)performSelectorOnMainThread:(SEL)selector waitUntilDone:(BOOL)waitUntilDone; 59 60 - (void)performSelectorOnMainThread:(SEL)selector withObject:(id)object1; 61 - (void)performSelectorOnMainThread:(SEL)selector withObject:(id)object1 waitUntilDone:(BOOL)waitUntilDone; 60 62 - (void)performSelectorOnMainThread:(SEL)selector withObject:(id)object1 withObject:(id)object2; 63 - (void)performSelectorOnMainThread:(SEL)selector withObject:(id)object1 withObject:(id)object2 waitUntilDone:(BOOL)waitUntilDone; 61 64 - (void)performSelectorOnMainThread:(SEL)selector withObject:(id)object1 withObject:(id)object2 withObject:(id)object3; 65 - (void)performSelectorOnMainThread:(SEL)selector withObject:(id)object1 withObject:(id)object2 withObject:(id)object3 waitUntilDone:(BOOL)waitUntilDone; 62 66 - (void)performInvocationOnMainThread:(NSInvocation *)invocation; 67 - (void)performInvocationOnMainThread:(NSInvocation *)invocation waitUntilDone:(BOOL)waitUntilDone; 63 68 64 69 @end WiredAdditions/trunk/NSObject-WIAdditions.m
r4827 r4873 113 113 114 114 115 - (void)performSelectorOnMainThread:(SEL)action waitUntilDone:(BOOL)waitUntilDone { 116 [self performSelectorOnMainThread:action withObject:NULL waitUntilDone:waitUntilDone]; 117 } 118 119 120 115 121 - (void)performSelectorOnMainThread:(SEL)action withObject:(id)object1 { 116 122 [self performSelectorOnMainThread:action withObject:object1 waitUntilDone:NO]; … … 120 126 121 127 - (void)performSelectorOnMainThread:(SEL)action withObject:(id)object1 withObject:(id)object2 { 128 [self performSelectorOnMainThread:action withObject:object1 withObject:object2 waitUntilDone:NO]; 129 } 130 131 132 133 - (void)performSelectorOnMainThread:(SEL)action withObject:(id)object1 withObject:(id)object2 waitUntilDone:(BOOL)waitUntilDone { 122 134 NSInvocation *invocation; 123 135 … … 128 140 [invocation setArgument:&object1 atIndex:2]; 129 141 [invocation setArgument:&object2 atIndex:3]; 130 [self performInvocationOnMainThread:invocation ];142 [self performInvocationOnMainThread:invocation waitUntilDone:waitUntilDone]; 131 143 } 132 144 } … … 135 147 136 148 - (void)performSelectorOnMainThread:(SEL)action withObject:(id)object1 withObject:(id)object2 withObject:(id)object3 { 149 [self performSelectorOnMainThread:action withObject:object1 withObject:object2 withObject:object3 waitUntilDone:NO]; 150 } 151 152 153 154 - (void)performSelectorOnMainThread:(SEL)action withObject:(id)object1 withObject:(id)object2 withObject:(id)object3 waitUntilDone:(BOOL)waitUntilDone { 137 155 NSInvocation *invocation; 138 156 … … 145 163 [invocation invoke]; 146 164 else 147 [self performInvocationOnMainThread:invocation ];165 [self performInvocationOnMainThread:invocation waitUntilDone:waitUntilDone]; 148 166 } 149 167 … … 151 169 152 170 - (void)performInvocationOnMainThread:(NSInvocation *)invocation { 171 [self performInvocationOnMainThread:invocation waitUntilDone:NO]; 172 } 173 174 175 176 - (void)performInvocationOnMainThread:(NSInvocation *)invocation waitUntilDone:(BOOL)waitUntilDone { 153 177 [invocation retainArguments]; 154 [invocation performSelectorOnMainThread:@selector(invoke) withObject:NULL waitUntilDone: NO];178 [invocation performSelectorOnMainThread:@selector(invoke) withObject:NULL waitUntilDone:waitUntilDone]; 155 179 } 156 180
