Mac::Glues on Mac OS X

| | Comments (0)
I did some investigation tonight on how to make glues for Mac::Glue from Mac OS X apps. Some observations:
  • We sometimes get the AppleScript terminology data in the aete resource from the files themselves. However, there is no one standard in the apps themselves. has a iTunes.rsrc resource fork file which I could open with MacPerl to create the glue; Internet had a similar file, but it was not a resource fork file, it was a plain data file. And Cocoa apps like don't have such a file with aete resource at all.
  • I suspect that, unlike Mac OS, Mac OS X won't have applications that won't respond to the "ascr\gdte" Apple event, which returns the aete data. In other words, maybe we won't have to parse any file data, and just get it via an event (which is what happens for most apps even under Mac OS 9).
  • The observations about being able to get aete data via Apple events doesn't directly apply to Scripting Additions and the "dialect" file. Standard Additions.osax is like Internet ... I need to figure out how to get the data from these things, since we always just opened the resource fork, and that may no longer be feasible. OTOH, maybe it will be. Or maybe I can somehow get the data via some Apple event.
  • So to get the data, I think can just drop a package on the droplet, find $package/Contents/PkgInfo, open it up, get the application's signature ("emal" for, and then use that to get the aete data. It worked just fine this way for, and I created a usable glue and everything:

      use Mac::Glue;
      my $mail = new Mac::Glue 'Mail';

    Yes, this is MacPerl running under Classic talking to a Cocoa app running under Mac OS X via Apple events with Mac::Glue. And it works with very little modification of Mac::AETE::App and Mac::AETE::Format::Glue.
  • Not all the problems are so easily solved, of course. There's the Scripting Additions problem mentioned above; there's also potential problems with launching apps, especially by path instead of signature, etc. All will need to be tested and played with in due time.

  • Of course, none of this is entirely useful right now, unless you want to use MacPerl on Mac OS X. The real purpose of this is to know what to do when we can use Mac::Glue under native perl on Mac OS X.

Leave a comment

<pudge/*> (pronounced "PudgeGlob") is thousands of posts over many years by Pudge.

"It is the common fate of the indolent to see their rights become a prey to the active. The condition upon which God hath given liberty to man is eternal vigilance; which condition if he break, servitude is at once the consequence of his crime and the punishment of his guilt."

About this Entry

This page contains a single entry by pudge published on March 11, 2002 9:19 PM.

Movies was the previous entry in this site.

SOAP Without Netscape Cookie File is the next entry in this site.

Find recent content on the main index or look in the archives to find all content.