adium/adium

92db93164d65
Parents 39eb15c93519
Children 05168b11a63b
As of 10.5 there exists a non-private API.
--- a/Source/AICreateCommand.m Sun Jun 10 12:00:20 2012 -0400
+++ b/Source/AICreateCommand.m Sun Jun 10 12:00:28 2012 -0400
@@ -30,7 +30,6 @@
*/
- (id)performDefaultImplementation
{
-#warning This uses a Private API
NSScriptClassDescription *newObjectDescription = [self createClassDescription];
id target = [self subjectsSpecifier];
@@ -64,16 +63,13 @@
/**
* @brief returns the object in the 'subj' key in this apple event.
- *
- * This uses a private API. It's the only way I've found to get the target of the 'make' command, which is necessary
- * in order to override performDefaultImplementation.
*/
- (id)subjectsSpecifier
{
NSAppleEventDescriptor *subjDesc = [[self appleEvent] attributeDescriptorForKeyword: 'subj'];
if ([subjDesc aeDesc] && [subjDesc aeDesc]->descriptorType == typeNull)
return nil;
- NSScriptObjectSpecifier *subjSpec = [NSScriptObjectSpecifier _objectSpecifierFromDescriptor: subjDesc inCommandConstructionContext: nil];
+ NSScriptObjectSpecifier *subjSpec = [NSScriptObjectSpecifier objectSpecifierWithDescriptor:subjDesc];
return [subjSpec objectsByEvaluatingSpecifier];
}
@end