• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Is OSACopyScriptingDefinitionFromURL broken?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Is OSACopyScriptingDefinitionFromURL broken?
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Use "say" from a background user account?
  • Next by Date: Re: Is OSACopyScriptingDefinitionFromURL broken?
  • Previous by thread: Use "say" from a background user account?
  • Next by thread: Re: Is OSACopyScriptingDefinitionFromURL broken?
  • Index(es):
    • Date
    • Thread