Scripting bridge: don't auto-generate method names that conflict with Objective C types (e.g. "id")

Originator:amorya
Number:rdar://19397011 Date Originated:07-Jan-2015 10:41 AM
Status:Open Resolved:
Product:OS X SDK Product Version:Mac OS X 10.10.1 (14B25)
Classification:Enhancement Reproducible:Always
 
The generated headers (and the runtime-resolved methods) don’t pay any attention to reserved Cocoa terminology. For instance, OmniFocus objects tend to have a property called “id”. In order to call it without errors or warnings, I have to do this:

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
	NSString *taskID = [self.sbTask performSelector:NSSelectorFromString(@"id")];
#pragma clang diagnostic pop

There needs to be some prefix automatically added to such methods, in order that they can be called directly as Cocoa methods without conflicting with built in types. This should be used both by the script that generates the headers, and by the runtime method resolution stuff within Scripting Bridge.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!