diff options
author | thomasvl@gmail.com <thomasvl@gmail.com@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2009-01-09 20:34:30 +0000 |
---|---|---|
committer | thomasvl@gmail.com <thomasvl@gmail.com@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2009-01-09 20:34:30 +0000 |
commit | 4fd103b5de98d2f469b982677ea389e7ee7d64b3 (patch) | |
tree | d0eb379fdc78996bc2e201515d26c7521d1fc8dc /AppKit/GTMGetURLHandler.m | |
parent | 84d1232477f398339e48ea504c45048e9328ef9b (diff) |
- turned off _debug framework support in tests since we now capture a lot more
in log validation.
- Added GTM_SUPPORT_GC for controlling the inclusion of GC related code.
- If you are using GTMUnitTestDevLog, it also tries to capture logs from
NSAssert.
- Added GTM_FOREACH_OBJECT/GTM_FOREACH_KEY that uses NSEnumerator and
objectEnumerator/keyEnumerator on 10.4, but on 10.5+/iPhone uses
FastEnumeration.
- GTMNSWorkspace+Running gives a variety of ways of determining the attributes
of running processes.
Diffstat (limited to 'AppKit/GTMGetURLHandler.m')
-rw-r--r-- | AppKit/GTMGetURLHandler.m | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/AppKit/GTMGetURLHandler.m b/AppKit/GTMGetURLHandler.m index 66c02eb..dcac292 100644 --- a/AppKit/GTMGetURLHandler.m +++ b/AppKit/GTMGetURLHandler.m @@ -149,9 +149,8 @@ withReplyEvent:(NSAppleEventDescriptor *)replyEvent { // classes properly. We check here instead of at init in case some of the // handlers are being handled by plugins or other imported code that are // loaded after we have been initialized. - NSEnumerator *enumerator = [urlTypes_ objectEnumerator]; NSDictionary *urlType; - while ((urlType = [enumerator nextObject])) { + GTM_FOREACH_OBJECT(urlType, urlTypes_) { NSString *className = [urlType objectForKey:kGTMBundleURLClassKey]; if ([className length]) { Class cls = NSClassFromString(className); @@ -215,18 +214,21 @@ withReplyEvent:(NSAppleEventDescriptor *)replyEvent { - (Class)getClassForScheme:(NSString *)scheme withReplyEvent:(NSAppleEventDescriptor*)replyEvent { - NSEnumerator *typeEnumerator = [urlTypes_ objectEnumerator]; NSDictionary *urlType; Class cls = nil; NSString *typeScheme = nil; - while (!typeScheme && (urlType = [typeEnumerator nextObject])) { + GTM_FOREACH_OBJECT(urlType, urlTypes_) { NSArray *schemes = [urlType objectForKey:kGTMCFBundleURLSchemesKey]; - NSEnumerator *schemeEnumerator = [schemes objectEnumerator]; - while ((typeScheme = [schemeEnumerator nextObject])) { - if ([typeScheme caseInsensitiveCompare:scheme] == NSOrderedSame) { + NSString *aScheme; + GTM_FOREACH_OBJECT(aScheme, schemes) { + if ([aScheme caseInsensitiveCompare:scheme] == NSOrderedSame) { + typeScheme = aScheme; break; } } + if (typeScheme) { + break; + } } if (typeScheme) { NSString *class = [urlType objectForKey:kGTMBundleURLClassKey]; |