Special

Clearance Sale!

We've been publishing for over five years now and it's time to clear out our inventory of back issues, so we're slashing prices!

RBD Magazines

Check out this amazing clearance sale of all our past issues. Missing some issues? This is a great time to complete your RBD collection. Save up to 40% off the regular price of our printed back issue packages. These prices are only good until the end of the year May 2008 and supplies are limited, so place your order today.

Article Preview


Buy Now

Print:
PDF:

Feature

AppleScriptable Applications

Implementing classes and events from the Standard Suite

Issue: 1.6 (June/July 2003)
Author: Thomas Reed
Author Bio: Thomas Reed has been programming as a hobbyist for more than 20 years, and fell in love with the Mac in 1984. Thanks to Patrick Wynne for help with some of the concepts in this article!
Article Description: No description available.
Article Length (in bytes): 8,991
Starting Page Number: 30
RBD Number: 1615
Resource File(s):

Download Icon 1615.sit Updated: Friday, October 17, 2003 at 12:21 PM

Related Web Link(s):

http://www.panix.com/~gmcgath/EightyRez.html
http://www.westcodesoft.com/downloads/
http://developer.apple.com/techpubs/mac/IAC/IAC-2.html

Known Limitations: None

Excerpt of article text...

Last issue's column discussed the basics of creating an AppleScriptable application. This issue will expand on that information, demonstrating how to define and handle standard AppleScript commands, which are more complex. The primary focus of this column will be the implementation of classes in your application's AppleScript interface.

A class in AppleScript acts as a container for properties, much like a class in REALbasic. However, it does not define events or methods as can be present in a REALbasic class. In the sample ArbieText application from the last issue, the AppleScript commands only interact with windows and their contents; thus, a window class is obviously called for.

Before defining a class in the 'aete' resource, a suite must be defined to contain it. Since we want to give ArbieText a more standard AppleScript interface, objects and classes from the Standard Suite should be used. Therefore, the first step in building the new 'aete' resource is to define this suite.

The Standard Suite's ID is 'core'. However, it is important to note that if you create a suite with ID 'core', the Script Editor will display ALL events and classes defined by the Standard Suite as part of your application's AppleScript dictionary, regardless of whether you have actually defined them. Therefore, it is common practice to give your Standard Suite an alternate ID, such as 'Core'. (Remember from last time, case is important!) Note, however, that events placed in this suite need not have the same class as the modified suite ID -- any events from the Standard Suite should still be defined as having class 'core'.

...End of Excerpt. Please purchase the magazine to read the full article.

Article copyrighted by REALbasic Developer magazine. All rights reserved.


 


|

 


Weblog Commenting and Trackback by HaloScan.com