git.ithinksw.org
/
ITFoundation.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f280896
)
Hopefully added a bit more error checking.
author
Kent Sutherland
<ksuther@ithinksw.com>
Sat, 1 Feb 2003 04:54:21 +0000
(
04:54
+0000)
committer
Kent Sutherland
<ksuther@ithinksw.com>
Sat, 1 Feb 2003 04:54:21 +0000
(
04:54
+0000)
ITAppleEventCenter.m
patch
|
blob
|
history
diff --git
a/ITAppleEventCenter.m
b/ITAppleEventCenter.m
index
273fecb
..
ceaf358
100755
(executable)
--- a/
ITAppleEventCenter.m
+++ b/
ITAppleEventCenter.m
@@
-46,6
+46,7
@@
static ITAppleEventCenter *_sharedAECenter = nil;
char *charResult;
DescType resultType;
Size resultSize, charResultSize;
char *charResult;
DescType resultType;
Size resultSize, charResultSize;
+ int pid;
// Variables for error checking
AEBuildError buildError;
// Variables for error checking
AEBuildError buildError;
@@
-57,7
+58,17
@@
static ITAppleEventCenter *_sharedAECenter = nil;
// Start Code
// ^ Most pointless comment EVAR!
// ^^ Nope, that one is
// Start Code
// ^ Most pointless comment EVAR!
// ^^ Nope, that one is
-
+
+ if (GetProcessPID(&psn, &pid) == noErr) {
+ if (pid ==0) {
+ NSLog(@"Process doesn't exist! Exiting.");
+ return;
+ }
+ } else {
+ NSLog(@"Error getting PID of application to send to! Exiting.");
+ return;
+ }
+
NSLog(@"_sendString: %s", sendString);
// The problem is, if I use eClass and eID in place of 'core' and 'getd' respectively, It won't build a valid AppleEvent :'(
NSLog(@"_sendString: %s", sendString);
// The problem is, if I use eClass and eID in place of 'core' and 'getd' respectively, It won't build a valid AppleEvent :'(