From df39cd4b2c3878a5e447aec90ad1380591ef2698 Mon Sep 17 00:00:00 2001 From: Alexander Strange Date: Sat, 14 Feb 2004 05:21:46 +0000 Subject: [PATCH] Beginning of new-style AE API; so new there's no code to speak of --- ITAppleEventCenter.m | 2 +- ITAppleEventTools.h | 17 ++++++++ ITAppleEventTools.m | 25 +++++++++++ ITFoundation.h | 3 +- ITFoundation.xcode/project.pbxproj | 69 ++++++++++++++++++++++++++++++ 5 files changed, 114 insertions(+), 2 deletions(-) create mode 100755 ITAppleEventTools.h create mode 100755 ITAppleEventTools.m diff --git a/ITAppleEventCenter.m b/ITAppleEventCenter.m index 9aa0c56..5e463d3 100755 --- a/ITAppleEventCenter.m +++ b/ITAppleEventCenter.m @@ -464,7 +464,7 @@ static ITAppleEventCenter *_sharedAECenter = nil; AEEventClass eClass = *((unsigned long*)[eventClass UTF8String]); AEEventID eID = *((unsigned long*)[eventID UTF8String]); - NSString *nssendString = [NSString stringWithFormat:@"'----':obj { form:'indx', want:'%s', seld:abso($616C6C20$), from:'null'() }", [key UTF8String]]; + NSString *nssendString = [NSString stringWithFormat:@"'----':obj { form:'indx', want:'%s', seld:type('all '), from:'null'() }", [key UTF8String]]; const char *sendString = [nssendString UTF8String]; AEArrayDataPointer result = nil; int pid; diff --git a/ITAppleEventTools.h b/ITAppleEventTools.h new file mode 100755 index 0000000..8b435bf --- /dev/null +++ b/ITAppleEventTools.h @@ -0,0 +1,17 @@ +/* + * ITAppleEventTools.h + * ITFoundation + * + * Created by Alexander Strange on Wed Feb 11 2004. + * Copyright (c) 2004 __MyCompanyName__. All rights reserved. + * + */ + +#import +#import + +extern NSAppleEventDescriptor *ITSendAEWithString(NSString *sendString, FourCharCode evClass, FourCharCode evID, ProcessSerialNumber *psn); + +@interface NSAppleEventDescriptor (ITAELogging) +-(void) logDesc; +@end \ No newline at end of file diff --git a/ITAppleEventTools.m b/ITAppleEventTools.m new file mode 100755 index 0000000..4685ee4 --- /dev/null +++ b/ITAppleEventTools.m @@ -0,0 +1,25 @@ +/* + * ITAppleEventTools.c + * ITFoundation + * + * Created by Alexander Strange on Wed Feb 11 2004. + * Copyright (c) 2004 __MyCompanyName__. All rights reserved. + * + */ + +#import "ITDebug.h" +#import "ITAppleEventTools.h" + +NSAppleEventDescriptor *ITSendAEWithString(NSString *sendString, FourCharCode evClass, FourCharCode evID, ProcessSerialNumber *psn) +{ +} + +@implementation NSAppleEventDescriptor (ITAELogging) +-(void) logDesc +{ + Handle xx; + AEPrintDescToHandle([self aeDesc],&xx); + ITDebugLog(@"AE Descriptor: %s", *xx); + DisposeHandle(xx); +} +@end \ No newline at end of file diff --git a/ITFoundation.h b/ITFoundation.h index 64ab051..cf6ddd9 100755 --- a/ITFoundation.h +++ b/ITFoundation.h @@ -21,4 +21,5 @@ #import -#import \ No newline at end of file +#import +#import \ No newline at end of file diff --git a/ITFoundation.xcode/project.pbxproj b/ITFoundation.xcode/project.pbxproj index 1780c87..8f5b236 100755 --- a/ITFoundation.xcode/project.pbxproj +++ b/ITFoundation.xcode/project.pbxproj @@ -87,6 +87,8 @@ 089C1665FE841158C02AAC07, 0867D69AFE84028FC02AAC07, 034768DFFF38A50411DB9C8B, + 3D97138805D9FD6B0033607F, + 3D97138905D9FD6B0033607F, ); isa = PBXGroup; name = ITFoundation; @@ -405,6 +407,67 @@ settings = { }; }; + 3D97137B05D9FB7C0033607F = { + fileRef = 7CA50B80054E786E0074E1D9; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Public, + ); + }; + }; + 3D97137C05D9FB7C0033607F = { + fileRef = 7CA50B7F054E786E0074E1D9; + isa = PBXBuildFile; + settings = { + }; + }; + 3D97137F05D9FBF40033607F = { + fileRef = 7CA50B8C054E787D0074E1D9; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Public, + ); + }; + }; + 3D97138105D9FBFA0033607F = { + fileRef = 7CA50B8B054E787D0074E1D9; + isa = PBXBuildFile; + settings = { + }; + }; + 3D97138805D9FD6B0033607F = { + fileEncoding = 4; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = ITAppleEventTools.h; + refType = 4; + sourceTree = ""; + }; + 3D97138905D9FD6B0033607F = { + explicitFileType = sourcecode.c.objc; + fileEncoding = 4; + isa = PBXFileReference; + path = ITAppleEventTools.m; + refType = 4; + sourceTree = ""; + }; + 3D97138A05D9FD6B0033607F = { + fileRef = 3D97138805D9FD6B0033607F; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Public, + ); + }; + }; + 3D97138B05D9FD6B0033607F = { + fileRef = 3D97138905D9FD6B0033607F; + isa = PBXBuildFile; + settings = { + }; + }; //3D0 //3D1 //3D2 @@ -694,6 +757,9 @@ 7CF6C930057D65B0007FEC13, 7CF6C938057D65BA007FEC13, 7C97DC2E05B614300013E85F, + 3D97137B05D9FB7C0033607F, + 3D97137F05D9FBF40033607F, + 3D97138A05D9FD6B0033607F, ); isa = PBXHeadersBuildPhase; runOnlyForDeploymentPostprocessing = 0; @@ -730,6 +796,9 @@ 7C97DC2F05B614300013E85F, 370786C305C0B4D700E6D1BA, 37B9B08305C1C47E00702FDB, + 3D97137C05D9FB7C0033607F, + 3D97138105D9FBFA0033607F, + 3D97138B05D9FD6B0033607F, ); isa = PBXSourcesBuildPhase; runOnlyForDeploymentPostprocessing = 0; -- 2.20.1