Is OSACopyScriptingDefinitionFromURL broken?
Is OSACopyScriptingDefinitionFromURL broken?
- Subject: Is OSACopyScriptingDefinitionFromURL broken?
- From: has <email@hidden>
- Date: Thu, 30 Oct 2014 19:27:18 +0000
Hi,
Could someone familiar with Xcode and C/ObjC please test the following
code for us?
#import <CoreFoundation/CoreFoundation.h>
#import <Carbon/Carbon.h>
int main(int argc, const char * argv[]) {
CFURLRef url = CFURLCreateWithFileSystemPath(NULL,
CFSTR("/Applications/TextEdit.app"), kCFURLPOSIXPathStyle, 1);
CFDataRef sdef;
OSACopyScriptingDefinitionFromURL(url, 0, &sdef);
CFStringRef string = CFStringCreateFromExternalRepresentation(NULL,
sdef, kCFStringEncodingUTF8);
CFShow(string);
return 0;
}
The documentation for OSACopyScriptingDefinitionFromURL() states "If
used with a file: URL, this call is equivalent to
OSACopyScriptingDefinition.", but OMM it *always* returns the dictionary
for the Apple Event Manager's crappy old XML-RPC/SOAP support:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dictionary SYSTEM "file://localhost/System/Library/DTDs/sdef.dtd">
<dictionary><suite name="Remote Procedure Calls" code="rpcd"
description="Apple Remote Procedure call interface for XML-RPC and
soap">...</suite></dictionary>
If someone else can confirm the same behavior on their machine, I'll
file a bug report on it.
Thanks,
has
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden