+ (id)sharedCenter
{
- if( _sharedAECenter != nil ) {
+ if( _sharedAECenter ) {
return _sharedAECenter;
} else {
_sharedAECenter = [[ITAppleEventCenter alloc] init];
AEEventID eID = *((unsigned long*)[eventID UTF8String]);
AppleEvent event, reply;
- AEBuildAppleEvent(eClass, eID, typeProcessSerialNumber,(ProcessSerialNumber*)&psn, sizeof(ProcessSerialNumber), kAutoGenerateReturnID, kAnyTransactionID, &event, nil, "");
+ AECreateAppleEvent(eClass, eID, typeProcessSerialNumber,(ProcessSerialNumber*)&psn, sizeof(ProcessSerialNumber), kAutoGenerateReturnID, kAnyTransactionID, &event);
AESend(&event, &reply, kAENoReply, kAENormalPriority, kAEDefaultTimeout, nil, nil);