Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to get scripting to work without NSApplication



Hey folks, I have a Foundation/NSRunLoop based damon that I would like to support the Required Suite in. Aren't we supposed to be doing this? I've read all of the Cocoa/AppleScript docs, and it mentions that we should support the Required Suite, but doesn't really tell how to do it. Nor can I find the 'oapp' event mentioned anywhere in there.

BTW, I am trying to do this because it appears to be the only way to perform some cleanup (for example, closing PGP's key database) when a Cocoa based app is quit during shutdown.

Anyway, here is my current scriptSuite (though I've tried many other permutations):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
<plist version="0.9">
<dict>
<key>AppleEventCode</key>
<string>PGPs</string>
<key>Classes</key>
<dict>
<key>CPGPservice</key>
<dict>
<key>AppleEventCode</key>
<string>capp</string>
<key>Superclass</key>
<string>NSCoreSuite.AbstractObject</string>
<key>SupportedCommands</key>
<dict>
<key>NSCoreSuite.Quit</key>
<string>handleQuitScriptCommand:</string>
</dict>
</dict>
</dict>
<key>Name</key>
<string>PGPserviceSuite</string>
</dict>
</plist>

Thanx for the help,

Jason

--
Jason A. Bobier email@hidden
Tech Lead, PGP Macintosh Products http://www.prismatix.com/
Network Associates, Inc. Nothing's constant

PGPKey: <http://keys.pgp.com:11371/pks/lookup?op=get&search=0xF6F83318>
Fingerprint: 7809 7E6E BCCA 903D 4618 9740 EB10 9DF9 F6F8 3318




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.