Changeset 3778
- Timestamp:
- 03/06/08 20:50:50 (7 months ago)
- Files:
-
- trunk/Chat Core.xcodeproj/project.pbxproj (modified) (1 diff)
- trunk/Chat Core/InterThreadMessaging.m (modified) (5 diffs)
- trunk/Chat Core/MVChatConnection.h (modified) (3 diffs)
- trunk/Chat Core/MVChatConnection.m (modified) (5 diffs)
- trunk/Chat Core/MVChatRoom.h (modified) (2 diffs)
- trunk/Chat Core/MVChatRoom.m (modified) (10 diffs)
- trunk/Chat Core/MVChatUser.h (modified) (2 diffs)
- trunk/Chat Core/MVChatUser.m (modified) (8 diffs)
- trunk/Chat Core/MVChatUserWatchRule.h (modified) (1 diff)
- trunk/Chat Core/MVChatUserWatchRule.m (modified) (4 diffs)
- trunk/Chat Core/MVFileTransfer.h (modified) (3 diffs)
- trunk/Chat Core/MVFileTransfer.m (modified) (6 diffs)
- trunk/Chat Core/MVICBChatRoom.m (modified) (2 diffs)
- trunk/Chat Core/MVICBChatUser.m (modified) (2 diffs)
- trunk/Frameworks/AGRegex/AGRegex.m (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Chat Core.xcodeproj/project.pbxproj
r3776 r3778 4 4 classes = { 5 5 }; 6 objectVersion = 4 4;6 objectVersion = 45; 7 7 objects = { 8 8 trunk/Chat Core/InterThreadMessaging.m
r3713 r3778 21 21 return useSystemVersion; 22 22 } 23 24 #if !defined(TARGET_OS_ASPEN) || !TARGET_OS_ASPEN 23 25 24 26 #import <pthread.h> … … 76 78 } 77 79 80 #endif 81 78 82 @implementation NSThread (InterThreadMessaging) 79 83 + (void) prepareForInterThreadMessages { 84 #if !defined(TARGET_OS_ASPEN) || !TARGET_OS_ASPEN 80 85 if(useSystemThreadPerformSelector()) 81 86 return; 82 87 [InterThreadManager class]; // Force the class initialization. 83 88 createMessagePortForThread([NSThread currentThread], [NSRunLoop currentRunLoop]); 89 #endif 84 90 } 85 91 @end 92 93 #if !defined(TARGET_OS_ASPEN) || !TARGET_OS_ASPEN 86 94 87 95 @implementation InterThreadManager … … 114 122 @end 115 123 124 #endif 125 116 126 static void performSelector(SEL selector, id receiver, id object, NSThread *thread, BOOL wait) { 117 127 if( ! thread || [thread isEqual:[NSThread currentThread]] ) { … … 125 135 } 126 136 137 #ifndef TARGET_OS_ASPEN 127 138 InterThreadMessage *msg = (InterThreadMessage *)malloc(sizeof(struct InterThreadMessage)); 128 139 bzero(msg, sizeof(struct InterThreadMessage)); … … 142 153 [components release]; 143 154 [data release]; 155 #endif 144 156 } 145 157 trunk/Chat Core/MVChatConnection.h
r3722 r3778 146 146 @property NSStringEncoding encoding; 147 147 148 @property( bycopy) NSString *realName;149 150 @property( bycopy) NSString *nickname;148 @property(copy) NSString *realName; 149 150 @property(copy) NSString *nickname; 151 151 @property(readonly) NSString *preferredNickname; 152 152 153 @property( bycopy) NSArray *alternateNicknames;153 @property(copy) NSArray *alternateNicknames; 154 154 @property(readonly) NSString *nextAlternateNickname; 155 155 156 @property( bycopy) NSString *nicknamePassword;156 @property(copy) NSString *nicknamePassword; 157 157 158 158 @property(readonly) NSString *certificateServiceName; 159 159 @property(readonly) NSString *certificatePassword; 160 160 161 @property( bycopy) NSString *password;162 163 @property( bycopy) NSString *username;164 165 @property( bycopy) NSString *server;161 @property(copy) NSString *password; 162 163 @property(copy) NSString *username; 164 165 @property(copy) NSString *server; 166 166 167 167 @property unsigned short serverPort; … … 169 169 @property MVChatMessageFormat outgoingChatFormat; 170 170 171 @property( bycopy) NSString *proxyUsername;172 173 @property( bycopy) NSString *proxyPassword;174 175 @property BOOL secure;176 177 @property( bycopy) NSDictionary *persistentInformation;171 @property(copy) NSString *proxyUsername; 172 173 @property(copy) NSString *proxyPassword; 174 175 @property(getter=isSecure) BOOL secure; 176 177 @property(copy) NSDictionary *persistentInformation; 178 178 179 179 @property MVChatConnectionProxy proxyType; 180 180 181 @property( bycopy) NSString *proxyServer;181 @property(copy) NSString *proxyServer; 182 182 183 183 @property unsigned short proxyServerPort; … … 191 191 @property(readonly) NSSet *chatUserWatchRules; 192 192 193 @property( bycopy) MVChatString *awayStatusMessage;194 195 @property(readonly ) BOOL connected;196 @property(readonly ) BOOL waitingToReconnect;193 @property(copy) MVChatString *awayStatusMessage; 194 195 @property(readonly, getter=isConnected) BOOL connected; 196 @property(readonly, getter=isWaitingToReconnect) BOOL waitingToReconnect; 197 197 @property(readonly) MVChatConnectionStatus status; 198 198 @property(readonly) unsigned int lag; trunk/Chat Core/MVChatConnection.m
r3727 r3778 140 140 _localUser = nil; 141 141 142 #if !defined(TARGET_OS_ASPEN) || !TARGET_OS_ASPEN 142 143 [[[NSWorkspace sharedWorkspace] notificationCenter] addObserver:self selector:@selector( _systemDidWake: ) name:NSWorkspaceDidWakeNotification object:[NSWorkspace sharedWorkspace]]; 143 144 [[[NSWorkspace sharedWorkspace] notificationCenter] addObserver:self selector:@selector( _systemWillSleep: ) name:NSWorkspaceWillSleepNotification object:[NSWorkspace sharedWorkspace]]; 144 145 [[[NSWorkspace sharedWorkspace] notificationCenter] addObserver:self selector:@selector( _applicationWillTerminate: ) name:NSWorkspaceWillPowerOffNotification object:[NSWorkspace sharedWorkspace]]; 145 146 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector( _applicationWillTerminate: ) name:NSApplicationWillTerminateNotification object:[NSApplication sharedApplication]]; 147 #endif 146 148 } 147 149 … … 232 234 - (void) dealloc { 233 235 [[NSNotificationCenter defaultCenter] removeObserver:self]; 236 237 #if !defined(TARGET_OS_ASPEN) || !TARGET_OS_ASPEN 234 238 [[[NSWorkspace sharedWorkspace] notificationCenter] removeObserver:self]; 239 #endif 235 240 236 241 [_npassword release]; … … 502 507 } 503 508 504 #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5505 @property(getter=isSecure, setter=setSecure:) BOOL secure;506 #endif507 508 509 - (BOOL) isSecure { 509 510 return _secure; … … 826 827 #pragma mark - 827 828 828 #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5829 @property(readonly, getter=isConnected) BOOL connected;830 #endif831 832 829 - (BOOL) isConnected { 833 830 return ( _status == MVChatConnectionConnectedStatus ); … … 858 855 _reconnectTimer = nil; 859 856 } 860 861 #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5862 @property(readonly, getter=isWaitingToReconnect) BOOL waitingToReconnect;863 #endif864 857 865 858 - (BOOL) isWaitingToReconnect { trunk/Chat Core/MVChatRoom.h
r3722 r3778 77 77 78 78 #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 79 @property(readonly , ivar) MVChatConnection *connection;79 @property(readonly) MVChatConnection *connection; 80 80 81 81 @property(readonly) NSURL *url; 82 @property(readonly , ivar) NSString *name;82 @property(readonly) NSString *name; 83 83 @property(readonly) NSString *displayName; 84 @property(readonly , ivar) id uniqueIdentifier;85 86 @property(readonly ) BOOL joined;87 @property(readonly , ivar) NSDate *dateJoined;88 @property(readonly , ivar) NSDate *dateParted;89 90 @property (ivar)NSStringEncoding encoding;91 92 @property(readonly , ivar) NSData *topic;93 @property(readonly , ivar) MVChatUser *topicAuthor;94 @property(readonly , ivar) NSDate *dateTopicChanged;84 @property(readonly) id uniqueIdentifier; 85 86 @property(readonly, getter=isJoined) BOOL joined; 87 @property(readonly) NSDate *dateJoined; 88 @property(readonly) NSDate *dateParted; 89 90 @property NSStringEncoding encoding; 91 92 @property(readonly) NSData *topic; 93 @property(readonly) MVChatUser *topicAuthor; 94 @property(readonly) NSDate *dateTopicChanged; 95 95 96 96 @property(readonly) NSSet *supportedAttributes; … … 99 99 @property(readonly) unsigned long supportedModes; 100 100 @property(readonly) unsigned long supportedMemberUserModes; 101 @property(readonly , ivar) unsigned long modes;101 @property(readonly) unsigned long modes; 102 102 103 103 @property(readonly) MVChatUser *localMemberUser; trunk/Chat Core/MVChatRoom.m
r3725 r3778 110 110 #pragma mark - 111 111 112 #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4113 112 - (MVChatConnection *) connection { 114 113 return _connection; 115 114 } 116 #endif117 115 118 116 #pragma mark - … … 159 157 } 160 158 161 #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4162 159 - (NSString *) name { 163 160 return _name; 164 161 } 165 #endif166 162 167 163 - (NSString *) displayName { … … 169 165 } 170 166 171 #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4172 167 - (id) uniqueIdentifier { 173 168 return _uniqueIdentifier; 174 169 } 175 #endif176 170 177 171 #pragma mark - … … 195 189 #pragma mark - 196 190 197 #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5198 @property(readonly, getter=isJoined) BOOL joined;199 #endif200 201 191 - (BOOL) isJoined { 202 192 return ( [self dateJoined] && ! [self dateParted] ); 203 193 } 204 194 205 #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4206 195 - (NSDate *) dateJoined { 207 196 return _dateJoined; … … 211 200 return _dateParted; 212 201 } 213 #endif 214 215 #pragma mark - 216 217 #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 202 203 #pragma mark - 204 218 205 - (NSStringEncoding) encoding { 219 206 return _encoding; … … 223 210 _encoding = encoding; 224 211 } 225 #endif226 212 227 213 #pragma mark - … … 252 238 #pragma mark - 253 239 254 #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4255 240 - (NSData *) topic { 256 241 return _topic; 257 242 } 258 #endif259 243 260 244 - (void) setTopic:(MVChatString *) topic { … … 262 246 } 263 247 264 #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4265 248 - (MVChatUser *) topicAuthor { 266 249 return _topicAuthor; … … 270 253 return _dateTopicChanged; 271 254 } 272 #endif273 255 274 256 #pragma mark - … … 331 313 #pragma mark - 332 314 333 #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4334 315 - (unsigned long) modes { 335 316 return _modes; 336 317 } 337 #endif338 318 339 319 - (id) attributeForMode:(MVChatRoomMode) mode { trunk/Chat Core/MVChatUser.h
r3722 r3778 85 85 86 86 #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 87 @property(readonly, ivar) MVChatConnection *connection; 88 @property(readonly, ivar) MVChatUserType type; 89 90 @property(readonly) BOOL remoteUser; 91 @property(readonly) BOOL localUser; 92 @property(readonly) BOOL wildcardUser; 93 94 @property(readonly) BOOL identified; 95 @property(readonly) BOOL serverOperator; 96 @property(readonly) BOOL watched; 97 98 @property(readonly, ivar) MVChatUserStatus status; 99 @property(readonly, ivar) NSData *awayStatusMessage; 100 101 @property(readonly, ivar) NSDate *dateConnected; 102 @property(readonly, ivar) NSDate *dateDisconnected; 103 @property(readonly, ivar) NSDate *dateUpdated; 104 105 @property(readonly, ivar) NSTimeInterval idleTime; 106 @property(readonly, ivar) NSTimeInterval lag; 87 @property(readonly) MVChatConnection *connection; 88 @property(readonly) MVChatUserType type; 89 90 @property(readonly, getter=isRemoteUser) BOOL remoteUser; 91 @property(readonly, getter=isLocalUser) BOOL localUser; 92 @property(readonly, getter=isWildcardUser) BOOL wildcardUser; 93 94 @property(readonly, getter=isIdentified) BOOL identified; 95 @property(readonly, getter=isServerOperator) BOOL serverOperator; 96 97 @property(readonly) MVChatUserStatus status; 98 @property(readonly) NSData *awayStatusMessage; 99 100 @property(readonly) NSDate *dateConnected; 101 @property(readonly) NSDate *dateDisconnected; 102 @property(readonly) NSDate *dateUpdated; 103 104 @property(readonly) NSTimeInterval idleTime; 105 @property(readonly) NSTimeInterval lag; 107 106 108 107 @property(readonly) NSString *displayName; … … 113 112 @property(readonly) NSString *serverAddress; 114 113 115 @property(readonly , ivar) id uniqueIdentifier;116 @property(readonly , ivar) NSData *publicKey;117 @property(readonly , ivar) NSString *fingerprint;114 @property(readonly) id uniqueIdentifier; 115 @property(readonly) NSData *publicKey; 116 @property(readonly) NSString *fingerprint; 118 117 119 118 @property(readonly) unsigned long supportedModes; 120 @property(readonly , ivar) unsigned long modes;119 @property(readonly) unsigned long modes; 121 120 122 121 @property(readonly) NSSet *supportedAttributes; trunk/Chat Core/MVChatUser.m
r3725 r3778 134 134 #pragma mark - 135 135 136 #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4137 136 - (MVChatConnection *) connection { 138 137 return _connection; … … 142 141 return _type; 143 142 } 144 #endif 145 146 #pragma mark - 147 148 #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 149 @property(readonly, getter=isRemoteUser) BOOL remoteUser; 150 @property(readonly, getter=isLocalUser) BOOL localUser; 151 @property(readonly, getter=isWildcardUser) BOOL wildcardUser; 152 #endif 143 144 #pragma mark - 153 145 154 146 - (BOOL) isRemoteUser { … … 165 157 166 158 #pragma mark - 167 168 #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5169 @property(readonly, getter=isIdentified) BOOL identified;170 @property(readonly, getter=isServerOperator) BOOL serverOperator;171 #endif172 159 173 160 - (BOOL) isIdentified { … … 266 253 #pragma mark - 267 254 268 #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4269 255 - (MVChatUserStatus) status { 270 256 return _status; … … 298 284 return _lag; 299 285 } 300 #endif301 286 302 287 #pragma mark - … … 337 322 #pragma mark - 338 323 339 #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4340 324 - (id) uniqueIdentifier { 341 325 return _uniqueIdentifier; … … 349 333 return _fingerprint; 350 334 } 351 #endif352 335 353 336 #pragma mark - … … 358 341 } 359 342 360 #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4361 343 - (unsigned long) modes { 362 344 return _modes; 363 345 } 364 #endif365 346 366 347 #pragma mark - trunk/Chat Core/MVChatUserWatchRule.h
r3526 r3778 32 32 @property(readonly) NSSet *matchedChatUsers; 33 33 34 @property( bycopy) NSString *nickname;34 @property(copy) NSString *nickname; 35 35 @property(readonly) BOOL nicknameIsRegularExpression; 36 36 37 @property( bycopy) NSString *realName;37 @property(copy) NSString *realName; 38 38 @property(readonly) BOOL realNameIsRegularExpression; 39 39 40 @property( bycopy) NSString *username;40 @property(copy) NSString *username; 41 41 @property(readonly) BOOL usernameIsRegularExpression; 42 42 43 @property( bycopy) NSString *address;43 @property(copy) NSString *address; 44 44 @property(readonly) BOOL addressIsRegularExpression; 45 45 46 @property( ivar, bycopy) NSData *publicKey;46 @property(copy) NSData *publicKey; 47 47 48 @property( ivar) BOOL interim;48 @property(getter=isInterim) BOOL interim; 49 49 50 @property( ivar, bycopy) NSArray *applicableServerDomains;50 @property(copy) NSArray *applicableServerDomains; 51 51 52 52 #else trunk/Chat Core/MVChatUserWatchRule.m
r3530 r3778 254 254 } 255 255 256 #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4257 256 - (NSData *) publicKey { 258 257 return _publicKey; … … 262 261 MVSafeCopyAssign( &_publicKey, publicKey ); 263 262 } 264 #endif265 266 #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5267 @property(ivar, getter=isInterim) BOOL interim;268 #endif269 263 270 264 - (BOOL) isInterim { … … 272 266 } 273 267 274 #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4275 268 - (void) setInterim:(BOOL) interim { 276 269 _interim = interim; … … 284 277 MVSafeCopyAssign( &_applicableServerDomains, serverDomains ); 285 278 } 286 #endif287 279 @end trunk/Chat Core/MVFileTransfer.h
r3526 r3778 47 47 48 48 #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 49 @property(readonly ) BOOL upload;50 @property(readonly ) BOOL download;51 @property(readonly ) BOOL passive;52 @property(readonly , ivar) MVFileTransferStatus status;53 @property(readonly , ivar) NSError *lastError;49 @property(readonly, getter=isUpload) BOOL upload; 50 @property(readonly, getter=isDownload) BOOL download; 51 @property(readonly, getter=isPassive) BOOL passive; 52 @property(readonly) MVFileTransferStatus status; 53 @property(readonly) NSError *lastError; 54 54 55 @property(readonly , ivar) unsigned long long finalSize;56 @property(readonly , ivar) unsigned long long transfered;55 @property(readonly) unsigned long long finalSize; 56 @property(readonly) unsigned long long transfered; 57 57 58 @property(readonly , ivar) NSDate *startDate;59 @property(readonly , ivar) unsigned long long startOffset;58 @property(readonly) NSDate *startDate; 59 @property(readonly) unsigned long long startOffset; 60 60 61 @property(readonly , ivar) NSHost *host;62 @property(readonly , ivar) unsigned short port;61 @property(readonly) NSHost *host; 62 @property(readonly) unsigned short port; 63 63 64 @property(readonly , ivar) MVChatUser *user;64 @property(readonly) MVChatUser *user; 65 65 66 66 #else … … 99 99 100 100 #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 101 @property(readonly , ivar) NSString *source;101 @property(readonly) NSString *source; 102 102 #else 103 103 - (NSString *) source; … … 114 114 } 115 115 #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 116 @property( ivar, bycopy) NSString *destination;117 @property(readonly , ivar) NSString *originalFileName;116 @property(copy) NSString *destination; 117 @property(readonly) NSString *originalFileName; 118 118 #else 119 119 - (NSString *) destination; trunk/Chat Core/MVFileTransfer.m
r3722 r3778 80 80 #pragma mark - 81 81 82 #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_583 @property(readonly, getter=isUpload) BOOL upload;84 @property(readonly, getter=isDownload) BOOL download;85 @property(readonly, getter=isPassive) BOOL passive;86 #endif87 88 82 - (BOOL) isUpload { 89 83 return NO; … … 98 92 } 99 93 100 #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4101 94 - (MVFileTransferStatus) status { 102 95 return _status; … … 142 135 return _user; 143 136 } 144 #endif145 137 146 138 #pragma mark - … … 226 218 #pragma mark - 227 219 228 #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4229 220 - (NSString *) source { 230 221 return _source; 231 222 } 232 #endif233 223 234 224 #pragma mark - … … 273 263 } 274 264 275 #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4276 265 - (NSString *) destination { 277 266 return _destination; … … 283 272 return _originalFileName; 284 273 } 285 #endif286 274 287 275 #pragma mark - trunk/Chat Core/MVICBChatRoom.m
r3722 r3778 35 35 #import "MVICBChatConnection.h" 36 36 #import "MVICBChatRoom.h" 37 #import "MVChatConnectionPrivate.h" 37 38 #import "MVChatString.h" 38 39 … … 58 59 - (void) setTopic:(MVChatString *) newTopic { 59 60 NSParameterAssert( newTopic ); 60 [(MVICBChatConnection *)_connection ctsCommandTopicSet:[newTopic string]]; 61 #if USE(ATTRIBUTED_CHAT_STRING) 62 NSString *newTopicString = [newTopic string]; 63 #elif USE(PLAIN_CHAT_STRING) 64 NSString *newTopicString = newTopic; 65 #endif 66 [(MVICBChatConnection *)_connection ctsCommandTopicSet:newTopicString]; 61 67 } 62 68 63 - (void) sendMessage:(MVChatString *) message 64 withEncoding:(NSStringEncoding) encoding withAttributes:(NSDictionary *) attributes { 69 - (void) sendMessage:(MVChatString *) message withEncoding:(NSStringEncoding) encoding withAttributes:(NSDictionary *) attributes { 70 #if USE(ATTRIBUTED_CHAT_STRING) 71 NSString *messageString = [message string]; 72 #elif USE(PLAIN_CHAT_STRING) 73 NSString *messageString = message; 74 #endif 65 75 if( [_memberUsers count] > 1 ) 66 [(MVICBChatConnection *)_connection ctsOpenPacket: [message string]];76 [(MVICBChatConnection *)_connection ctsOpenPacket:messageString]; 67 77 } 68 78 trunk/Chat Core/MVICBChatUser.m
r3722 r3778 35 35 #import "MVICBChatConnection.h" 36 36 #import "MVICBChatUser.h" 37 #import "MVChatConnectionPrivate.h" 37 38 #import "MVChatString.h" 38 39 … … 69 70 #pragma mark Message handling 70 71 71 - (void) sendMessage:(MVChatString *) message 72 withEncoding:(NSStringEncoding) encoding 73 withAttributes:(NSDictionary *) attributes { 74 [(MVICBChatConnection *)_connection ctsCommandPersonal:_nickname withMessage:[message string]]; 72 - (void) sendMessage:(MVChatString *) message withEncoding:(NSStringEncoding) encoding withAttributes:(NSDictionary *) attributes { 73 #if USE(ATTRIBUTED_CHAT_STRING) 74 NSString *messageString = [message string]; 75 #elif USE(PLAIN_CHAT_STRING) 76 NSString *messageString = message; 77 #endif 78 [(MVICBChatConnection *)_connection ctsCommandPersonal:_nickname withMessage:messageString]; 75 79 } 76 80 trunk/Frameworks/AGRegex/AGRegex.m
r3642 r3778 143 143 // check for valid ASCII string 144 144 if (![str canBeConvertedToEncoding:NSASCIIStringEncoding]) 145 [NSException raise: @"%@ is not a valid ASCII string, build with UTF-8 support", str];145 [NSException raise:NSInvalidArgumentException format:@"%@ is not a valid ASCII string, build with UTF-8 support", str]; 146 146 #endif 147 147 // sanity check range
